This article describes how to configure StoreFront resource filter to hide certain resources by type or keyword.
Instructions
A popular customization of Web Interface is to hide certain resources (applications, desktops or documents) from users. StoreFront 2.5 provides a resource filter to support this out of the box. Resources can be filtered by type or keyword. The filter you set up for a Store will work for both the Receiver for Web and native receivers (for example, Receiver for Windows).
Before running the cmdlets in the following sections, you must import the necessary PowerShell modules. Use the following snippet to import:
$dsInstallProp = Get-ItemProperty `
-Path HKLM:\SOFTWARE\Citrix\DeliveryServicesManagement -Name InstallDir
$dsInstallDir = $dsInstallProp.InstallDir
& $dsInstallDir\..\Scripts\ImportModules.ps1
Filtering by Type
To hide resources by type, the PowerShell command
Set-DSResourceFilterType can be used. The syntax is:
Set-DSResourceFilterType [-SiteId] <Int64> [-VirtualPath] <String> `
[-IncludeTypes] <Object>This will set up an inclusive resource filter for a specific store.
- SiteId is the IIS site ID, which is normally 1.
- VirtualPath is the virtual path of the Store Service, which normally is /Citrix/Store.
- IncludeTypes is an array of strings representing the types of resources (Applications, Desktops or Documents) to be included.
For example, if you want to show only applications for a store in /Citrix/Store, the following command configures the store appropriately:
Set-DSResourceFilterType -SiteId 1 -VirtualPath "/Citrix/Store" `
-IncludeTypes @("Applications")The PowerShell command
Get-DSResourceFilterType can be used to examine the filter you have set up. The syntax is:
Get-DSResourceFilterType [-SiteId] <Int64> [-VirtualPath] <String>
Filtering by Keyword
To hide resources by keyword, the PowerShell command
Set-DSResourceFilterKeyword can be used to set up an inclusive or exclusive filter. The syntax is:
Set-DSResourceFilterKeyword -SiteId <Int64> -VirtualPath <String> `
-IncludeKeywords <Object>-Or-
Set-DSResourceFilterKeyword -SiteId <Int64> -VirtualPath <String> `
-ExcludeKeywords <Object>For example, if you want to configure Store1 at /Citrix/Store1 to only show resources with keywordForStore1, the following command will configure the store to do that:
Set-DSResourceFilterKeyword -SiteId 1 -VirtualPath "/Citrix/Store1" `
-IncludeKeywords @("ForStore1")If you want to configure Store1 at /Citrix/Store1 to not show any resources with keywordHiddenFromStore1, the following command will configure the store:
Set-DSResourceFilterKeyword -SiteId 1 -VirtualPath "/Citrix/Store1" `
-ExcludeKeywords @("HiddenFromStore1")The PowerShell command
Get-DSResourceFilterKeyword can be used to examine the filter you have set up. The syntax is:
Get-DSResourceFilterKeyword [-SiteId] <Int64> [-VirtualPath] <String>