Configuring Citrix Workspace using PowerShell module

Getting started

System requirements

Windows PowerShell version 5 is the minimum required version.

Installing the PowerShell modules

  1. Download the configuration PowerShell module.
  2. Unpack the .zip to a location of your choosing.

Client ID and secret

To use the API you need a client ID and Secret. For more information, see Citrix Cloud API.

Loading the PowerShell module

Use the following script to load the PowerShell module:

$ModulePath = "<insert path to powershell modules>\Citrix.Workspace.StoreConfigs.psm1"

if (Test-Path -Path $ModulePath)
{
    Write-Host "Importing StoreConfig PowerShell Module..." -ForegroundColor "Green"
    Import-Module -Name $ModulePath -verbose
}
else
{
    throw "StoreConfig PowerShell Module not found."
}
<!--NeedCopy-->

Get help on modules

The Workspace configuration module contains two cmdlets:

  • Get-WorkspaceCustomConfiguration
  • Set-WorkspaceCustomConfiguration

The PowerShell cmdlet Get-Help gives detailed instructions for a cmdlet:

Get-Help Get-WorkspaceCustomConfiguration -Full
Get-Help Set-WorkspaceCustomConfiguration -Full
<!--NeedCopy-->

Run PowerShell cmdlet

To run a PowerShell command, you need the ClientID, ClientSecret and Workspace URL domain. If you have multiple cloud.com domains you can use any one. You must enter the cloud.com domain even if you have a custom domain configured and the cloud.com domain is disabled.


[string]$APIClientID = "<insert ClientID>"
[string]$APIClientSecret = "<insert ClientSecret>"
[string]$WSPURL = "<insert cloud.com domain>"

# Get configuration
Get-WorkspaceCustomConfigurations -WorkspaceUrl $WSPURL `
                                  -ClientId $APIClientID `
                                  -ClientSecret $APIClientSecret `
                                  -Verbose
<!--NeedCopy-->

Examples

  • Run the following command to enable DisallowICADownload: Set-WorkspaceCustomConfigurations -WorkspaceUrl $WSPURL -ClientId $APIClientID -ClientSecret $APIClientSecret -DisallowIcaDownload $true
  • Run the following command to set inactivityTimeoutInMinutes to 1 hour, for example: Set-WorkspaceCustomConfigurations -WorkspaceUrl $WSPURL -ClientId $APIClientID -ClientSecret $APIClientSecret -InactivityTimeoutInMinutes "60"
  • Run the following command to enable DisallowICADownload and set inactivityTimeoutInMinutes in a single command: Set-WorkspaceCustomConfigurations -WorkspaceUrl $WSPURL -ClientId $APIClientID -ClientSecret $APIClientSecret -DisallowIcaDownload $true -InactivityTimeoutInMinutes "60"

Troubleshooting

In the event of issues, -Verbose may be supplied to any of the cmdlets in order to produce additional logging. For example:

Set-WorkspaceCustomConfigurations [-WorkspaceUrl] <Uri> [-ClientId] <String> [-ClientSecret] <String> [[-DisallowIcaDownload] <Boolean>] -Verbose

Getting started