Paul McCran's

Portfolio

Powershell - Convert old icon files to Base64 and apply the icon to a XenApp 7.7+ Published Application

This powershell command can be used to convert old .ico files into Base64, so that they can then be assigned to a XenApp 7.7+ published application.  You can use the Studio console to import these icons too, but there may be an occasion where you have a list of apps and associated icon files that can be imported easier via powershell.

You can use this powershell command to automate the conversion of multiple files and then have them assigned to Citrix published app IconUIDs:

You will need to change the Icon path and Publication name for this test. You will also need to run this test from a machine that has the latest XenApp/Desktop CMDlets installed.  eg a Delivery Controller (Run the Powershell tool from the Studio Console if in doubt)

asnp citrix*
$path="c:\icons\harmony.ico"
$convertedicon=[convert]::ToBase64String((get-content $path -encoding byte))
New-BrokerIcon -encodedicondata $convertedicon
$icontemp=get-brokericon -property uid,encodedicondata | where-object{$_.Encodedicondata -eq $convertedicon}
$InputIconID=$icontemp.uid
Get-BrokerApplication -name "PublicationName" | Set-BrokerApplication -IconUid $inputiconid
Next PostNewer Post Previous PostOlder Post Home