Contents

Hiding Applications in Citrix StoreFront

Website Visitors:

A very 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 (e.g. Receiver for Windows). This short article shows you how to configure StoreFront resource filter to hide certain resources by type or keyword.

Before you can run the cmdlets in the following sections, you have to import the necessary PowerShell modules. The following snippet does it for you:

1
2
3
4
$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.  It’s 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 would like to show only applications for a store in /Citrix/Store, the following command will configure 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. Its 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 would like 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 would like to configure Store1 at /Citrix/Store1 to not show any resources with keywordHiddenFromStore1, the following command will configure the store for you:

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>

Posted in Citrix Blogs

Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: