With the release of Citrix Workspace 2503 CR being a complete dustbin fire with no end of issues I’ve decided to move all our endpoints back to the LTSR edition in an attempt to try and get some stability.
PowerShell script is below to help with this transition if anyone else finds it useful, it checks the Citrix Workspace version installed on an endpoint and removes any incorrect version and installs 2402 LTSR.
$minimumVersion = [Version]"24.2.3001.9"
$installerPath = "C:\IT\CitrixWorkspaceApp2402LTSR.exe"
$registryPaths = @(
"HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
"HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
)
$needsReinstall = $true
foreach ($path in $registryPaths) {
$app = Get-ItemProperty $path -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -like "Citrix Workspace*" } |
Select-Object -First 1
if ($app) {
try {
$installedVersion = [Version]$app.DisplayVersion
} catch {
Write-Output "Could not parse installed version: $($app.DisplayVersion)"
continue
}
if ($installedVersion -eq $minimumVersion) {
Write-Output "Citrix Workspace is already at an acceptable version: $($app.DisplayVersion)"
$needsReinstall = $false
} else {
Write-Output "Incorrect version detected: $($app.DisplayVersion). Uninstalling..."
Start-Process -FilePath $installerPath -ArgumentList "/silent", "/uninstall" -PassThru | Wait-Process
}
break
}
}
if ($needsReinstall) {
Write-Output "Installing Citrix Workspace version $minimumVersion"
Start-Process -FilePath $installerPath -ArgumentList "/CleanInstall", "/silent", "/includeSSON", "/installMSTeamsPlugin" -PassThru | Wait-Process
Write-Output "Installation complete."
}
Before running this I’ve set a Group Policy Object to copy the installer from a shared network drive to C:\IT\CitrixWorkspaceApp2402LTSR.exe – change the installer path as and when required.
If all your endpoints were local you could get away with running it direct from a network drive but ours are connected across an SD-WAN so for quickness better to get the installer on each device first before running the script.