Get-BrokerScopedObject command returns the UID of the scoped object rather than the UUID

Whilst working on our Citrix Documentation tool we've noticed some more inconsistency between the Citrix PowerShell commands.

When you're looking to find the objects that are referenced by a scope you have to run several commands (for some reason there is no Get-ScopedObject cmdlet).

Get-BrokerScopedObject
Get-AcctScopedObject
Get-HypScopedObject
Get-ProvScopedObject


The issue is that the Get-BrokerScopedObject returns the ObjectID as the UID an integer in string format of the object whereas the other command return the UUID (in GUID format).

The UID is unique only within the object type whereas the UUID is universally unique to any object within the site and therefore more useful.

The solution to this is to read the "ObjectType" enum value and then obtain the UUID using another command

If the ObjectType is DesktopGroup then run the command
Get-BrokerDesktopGroup =UID ObjectId

If the ObjectType is Catalog then run the command
Get-BrokerCatalog =UID ObjectId


And read the UUID property of the returned value.

Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Windows Server 2019 desktop icons such as My Computer, Windows cannot access the specified device, path, or file.