{"id":18,"date":"2013-10-22T18:58:09","date_gmt":"2013-10-22T16:58:09","guid":{"rendered":"http:\/\/blog.appcloud.ch\/?p=18"},"modified":"2013-10-22T18:58:09","modified_gmt":"2013-10-22T16:58:09","slug":"have-a-look-into-the-storefront-2-0-subscription-database","status":"publish","type":"post","link":"https:\/\/blog.sachathomet.ch\/de\/2013\/10\/22\/have-a-look-into-the-storefront-2-0-subscription-database\/","title":{"rendered":"Have a look into the StoreFront 2.x Subscription Database"},"content":{"rendered":"<p>Last days I had to deal with Citrix StoreFront 2.0 and found out that a numerous issues still exists and that some things are still not implemented to configure in the StoreFront MMC SnapIn.<\/p>\n<p>Session timeouts and settings like enable or disable of features like workspace control still must be handled over the config-files. But this is all well documented the <a title=\"Citrix StoreFront 2.1 documentation\" href=\"http:\/\/support.citrix.com\/proddocs\/topic\/dws-storefront-21\/dws-version-wrapper.html\" target=\"_blank\">official documentation of Citrix<\/a>.<\/p>\n<p>But seems there is no possibility to have a look into the subscription database from Citrix Storefront which is now with version 2.0 in a\u00a0proprietary non-MSSQL format. For this reason I created this small script (execute it on the StoreFront server):<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\n#========================================================================\n# Created on: 22.10.2013\n# Created by: Sacha T. blog.sachathomet.ch\n# Filename: GetSubscriptedStoreFrontApps.ps1\n#========================================================================\n#define some variables\n#$domainname = &amp;quot;anotherDomain&amp;quot; # use that if your user is in another domain\n$domainname = $env:userdomain\n$storename = &amp;quot;StoreFront&amp;quot;      # Change this to your Store-Name\n$subinfofile = &amp;quot;C:\\temp\\temp-subscriptions.csv&amp;quot;\nWrite-Host Query StoreFront apps in domain $domainname in Store $storename\n$username = Read-Host &amp;quot;Please enter username to query&amp;quot;\n#Add Module for Citrix StoreFront\nImport-Module &amp;quot;C:\\Program Files\\Citrix\\Receiver StoreFront\\Scripts\\ImportModules.ps1&amp;quot;\n#Change username to domain SID\n$objUser = New-Object System.Security.Principal.NTAccount($domainname, $username)\n$strSID = $objUser.Translate(&#x5B;System.Security.Principal.SecurityIdentifier])\n#delete old Subcriptionexportfile\nRemove-Item $subinfofile -ErrorAction SilentlyContinue\n#Create new Subcriptionexportfile\nExport-DSStoreSubscriptions -StoreName $storename -FilePath $subinfofile\n##Add a caption to the file, this is needed to process csv\n$content = Get-Content $subinfofile\nSet-Content $subinfofile sid.app\nAdd-Content $subinfofile $content\n#Read all Lines in CSV from this User which are not unsubscribed\nimport-csv C:\\Temp\\temp-subscriptions.csv -delimiter &amp;quot;.&amp;quot;| Where-Object {$_.sid -like &amp;quot;$strSID*&amp;quot; -and $_.app -notlike &amp;quot;*unsubscribed*&amp;quot;}| Format-Table -Property app\n#wait to read the result - usefull if started from WindowsExplorer with &amp;quot;Run in PowerShell&amp;quot;\nWrite-Host &amp;quot;Press any key to continue \u00e2\u20ac\u00a6&amp;quot;\n$x = $host.UI.RawUI.ReadKey(&amp;quot;NoEcho,IncludeKeyDown&amp;quot;)\n\n<\/pre>\n<pre><span style=\"color: #808080;\">\u00a0<\/span><\/pre>\n<p>When I&#8217;ve created this script I found out that deleted apps wont be removed from the subscription database and as well users who leave the company will still have records in the database after they are deleted in the AD. So within the years, the subscription database will have a lot of orphan data in the database. Seems that an automated clean-up does not exists.<\/p>\n<p>There is a way to delete the records, have a look to forum post of Duncan Gabriel Thread:<\/p>\n<p>Delete user subscriptions?\u00a0 <span style=\"text-decoration: underline;\">http:\/\/forums.citrix.com\/thread.jspa?threadID=334609<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last days I had to deal with Citrix StoreFront 2.0 and found out that a numerous issues still exists and that some things are still not implemented to configure in the StoreFront MMC SnapIn. Session timeouts and settings like enable or disable of features like workspace control still must be handled over the config-files. But [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,1],"tags":[14,32,38],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-scripts","category-uncategorized","tag-citrix","tag-powershell","tag-storefront"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"de","enabled_languages":["en","de"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"de":{"title":false,"content":false,"excerpt":false}}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":0,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sachathomet.ch\/de\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}