Forum / Remote Desktop Manager - PowerShell Repository

How to assign Custom icons to entries using PowerShell

  • Create an Issue
  • Cancel

Custom icons are stored in the datasource as a Base64String.
Assign a custom image to an entry.
Use the View > Entry History > Compare method to see what the string is for the custom image. (there may be a better way to obtain this)
I copied and pasted the following attributes: <Image> and <ImageMD5>
then use this code to assign that icon to your entries:


$Sessions = Get-RDMSession
foreach ($session in $Sessions) {
$session.ImageName = $null
$session.Image = [System.Convert]::FromBase64String("paste the string copied from between the <Image> </Image> tags here")
$session.ImageMD5 = 'paste the string copied from between the <ImageMD5> </ImageMD5> tags here'
Set-RDMSession $session


This will change all entries, don't forget to include a filter for the entry type as required.

I changed the default orange icons for the blue variation but then discovered they didn't have a blue alternative for the default Device group / folder type.

Of course I didn't discover this until I had changed every other entry type to blue.
If anyone wants a blue device icon here is the code:

$session.Image = [System.Convert]::FromBase64String("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAABcJJREFUWEfFV2lsVFUUbjS4BFziiqKCG5KoMS5RQKNE/SFxQbS/1GgiGjXRH6CyWInCgEChCmVTsVRZpAmRJmopyGIQVAioLFLZsZR25t0365vOTGc68z7Pd9/MvGnL0BKInOQkd8495zvfPe/cZUpwlqXHBAwricWbDazYZqJyg4EhlT6UvOsox7Rxjj707al0S8AfTaFinQ/DvzTQa7xCnzKFiycqXPmxwrUeRzmmjXP0oS9jGNudFCFgw4q34/1aAyVjDFz0oZPkhqmO9he98RMTt0x3lGPacvP0ZQxjiUEsYp5IOhGwsU/FUb7WwHNVBi74QKGfrJDgjy5UqNhgouq3ANbvDaA5GM/GQI9p4xx96MsYxhKDWMQkdmciBQQy2OONwVOncO44hStkFTdPUxg238SSrUHsPBaGnem+pDbasetYBNW/B/DIfAeDWMT01JnY7bXEK+M4i+QJ7GiMYGSVDxcK42smKwyuVFi2LYCG5mjWw5V0JoN4Mo1EVmOinVeWtjPY2WhhuW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