cosmistack-logo

Firewalls4Less is Live!Shop premium hardware at unbeatable prices.

Shop now
Person sitting at computer

How To Install Citrix Workspace With PowerShell

By Jake T on 3/24/25

Description: Looking to ease mass deployment of Citrix Workspace? A PowerShell script can be a quick and easy way to rollout the app to your endpoints.

Intro

Citrix Workspace is used by countless organizations across the globe to deliver virtual desktops and applications to end users. Installing it is usually straightforward and without issue, and can be done manually on individual endpoints, in bulk via RMM tools, or with some kind of script, like PowerShell.

One key problem does exist, though, that can make mass deployment tricky for some organizations: Citrix does not provide stable URL's to download specific versions from. If you navigate to Citrix's website to download the latest version, you'll notice that the download comes from a signed, temporary URL unique to your request. While there is a fixed URL that Citrix (unofficially) provides, you can't specify which version of the application you want to download. This is makes it a no-go for organizations who do controlled rollouts of app versions.

We also recently encountered the need to use PowerShell to install Workspace as our RMM tool would not support the semi-colons in the STORE{n} configuration parameter that we needed to pass during install.

Steps

  1. 1. First, decide which Citrix Workspace version you want to deploy (LTSR, latest, etc). Download the installer (a .exe file) from the Citrix website , and save it to a location that will be accessible to your endpoints.
  2. 2. In our case, we'll be saving the installer to a network share folder that our endpoints can reach. If you don't have a network share setup though, you could use something like a public S3 bucket or some other web location.
  3. 3. Write your PowerShell script (using the example below to start) and ensure the specifics match your situation
  4. 4. Use your method of choice to run this script on the necessary endpoints
  5. 5. Reboot the endpoints. It may not be necessary in all cases, but we definitely recommend it to ensure a clean and complete install

The Script

Use the script below as a starting point for your installation. Please use caution and read our disclaimer below before using this script. If your installer file is hosted at a web location (i.e. cloud object storage), you'll need to alter this script to use something like the

Invoke-WebRequest

method to first download the installer to the endpoint, and then run the install command. If you're using a network share like we are, you should be able to run the install command directly without needing to copy the installer file to the endpoint first.

# USE THIS SCRIPT AT YOUR OWN RISK! ALWAYS DOUBLE-CHECK THE COMMANDS AND ONLY USE INSTALLERS FROM TRUSTED LOCATIONS!
$NetworkShare = "\\STORAGE1\SoftwareInstallers"
$InstallerName = "CitrixWorkspaceApp.exe"
$InstallerPath = "$NetworkShare\$InstallerName"

# Configure your storefront below
$StoreParam = '"My Store; https://example.com/Citrix/MyStore/discovery; On; My Storefront"'

try {
  # Ensure the installer exists 
  if (-not (Test-Path -Path $InstallerPath)) {
    throw "Error: Installer not found on network share!"
  }
  
  # Run the installer directly from the network share
  # CHECK THE INSTALL ARGUMENTS BELOW! THESE ARE THE FLAGS WE USE, BUT THEY MAY NOT BE RIGHT FOR YOUR ENVIRONMENT!
  Start-Process -FilePath $InstallerPath -ArgumentList "/silent /forceinstall /CleanInstall /includeSSON /AutoUpdateCheck=disabled /EnableCEIP=false STORE0=$StoreParam" -Wait -NoNewWindow
} catch {
  Write-Host "An error occurred while installing Citrix Workspace"
  Write-Host $_
}

Keep in mind that you may need to run this script with

-ExecutionPolicy Bypass
flag to avoid Windows blocking the install for security reasons. Always use this flag with caution and ensure you know what you're doing!

Conclusion

If you need to deploy Citrix Workspace en masse, a simple PowerShell script can get you up and running in no time. Using a private, fixed storage location for the installer file allows you to use a specific app version without needing to worry about getting a fresh signed URL from the Citrix website.

For all of your IT consulting, software, and hardware needs, reach out to Cosmistack today!

Join our Newsletter!

Stay up to date with the latest news from the IT industry and receive exclusive offers from Cosmistack!

By signing up, you agree to our Privacy Policy and to receive emails from Cosmistack. You can unsubscribe at any time.

Tags:

citrix workspacepowershellinstall citrix workspacecitrix workspace script

Disclaimer: The information provided in this article is for educational and informational purposes only. The techniques, tools, and technologies discussed are intended to be used by individuals with a solid understanding of the subject matter. Readers are entirely responsible for any actions they take based on the content of this article. This blog and its authors do not assume any responsibility for any unintended outcomes, data loss, or issues that may arise from following the instructions or recommendations provided.

Copyright © 2024 Cosmistack, Inc. All rights reserved. | Privacy Policy