Complete list of built-in ImageName values for Hub Business PowerShell module?

Complete list of built-in ImageName values for Hub Business PowerShell module?

avatar

Hi,

I'm using the Devolutions.PowerShell module to programmatically manage entries in Hub Business. I'd like to set
icons on entries via the Connection.ImageName property.

Through trial and error, I've found some valid names like:
- SampleServerOrange
- SampleDesktopBlue
- SampleLaptopBlue
- SampleWindowsOrange
- SampleCloudBlue
- SampleBookBlue
- SampleHourglassBlue
- SampleActiveDirectoryControllerYellow
- Color-only names like [Red], [Green], [Purple]

The naming pattern seems to be Sample{Type}{Color}, but the ImageName property is a plain string, not an enum, so
there's no autocomplete or discoverable list.

Question: Is there a complete list of valid built-in ImageName values? Or is there a method in the assembly to
enumerate them? I found CustomImageManager.Definitions and ImageManager.GetDefaultSvgName() in the
Devolutions.RemoteDesktopManager.Business namespace but couldn't extract the full list.

All Comments (4)

avatar

Hello @perler,

You can use the following method to retrieve the available icon names:

[Devolutions.RemoteDesktopManager.Managers.CustomImageManager]::GetCustomLargesImages() | Select ImageName | Format-Table


If you would like to customize the icon color, you can append the desired color to the end of the image name.
The supported colors are:

Black, Blue, Forest, Green, Grey, Orange, Purple, Red, Royal, Yellow, and Brown.


Please let us know if you have any questions or need further assistance.
Best regards,

avatar

The `GetCustomLargesImages()` method from `CustomImageManager` didn't work for me — it's only available in the RDM desktop application, not in the
PowerShell module. But I found another way to get the full list using just the `Devolutions.PowerShell` module. The module ships with
`Devolutions.Image.dll` which contains all 1,327 SVG icons as embedded resources. Run this to list them:

```powershell
Import-Module Devolutions.PowerShell
$modPath = (Get-Module Devolutions.PowerShell).ModuleBase
$asm = [System.Reflection.Assembly]::LoadFrom((Join-Path $modPath 'Devolutions.Image.dll'))
$asm.GetManifestResourceNames() | Where-Object { $_ -like '*.svg' } | ForEach-Object {
$_ -replace '^Devolutions\.RemoteDesktopManager\.Resources\.Svg\.','' -replace '\.svg$',''
} | Sort-Object

The ImageName format is Sample<BaseName><Color>, where colors are: Black, Blue, Forest, Green, Grey, Orange, Purple, Red, Royal, Yellow. For example:
SampleServerBlue, SampleSwitchBlack, SampleDesktopOrange.
```

avatar

ok, markup posting doesn't seem to work, but anyways, you get the gist :) thanks!

avatar

Hello,

To ensure this works properly, the RDM instance must be loaded first. You can do this by using Get-RDMInstance or by calling any other cmdlet from the module. For example, a common approach is to run Get-HubSystemSettings, after which you can use the previously mentioned GetCustomLargesImages() method.

That said, it looks like you’ve already found a way to make it work, which is great to see. There’s more than one way to achieve the desired result.
Please feel free to reach out if you need any further assistance.

Best regards,