VMware Cloud Community
CraigH1
Contributor
Contributor

Horizon View - Convert User ID to English Username

Hello.

I am trying to display the user assigned to a desktop. Horizon View 7.1, PowerCLI 6.5. When I display the desktop details:

$hvDesktops[0] | fl *

Name                             : XX-YY-ZZZZ

DnsName                          : xx-yy-zzzz.xyz.com

User                             : VMware.Hv.UserOrGroupId

AccessGroup                      : VMware.Hv.AccessGroupId

Desktop                          : VMware.Hv.DesktopId

Session                          : VMware.Hv.SessionId

BasicState                       : CONNECTED

Type                             : MANAGED_VIRTUAL_MACHINE

OperatingSystem                  : Windows 7

AgentVersion                     : 7.1.0

AgentBuildNumber                 : 5170901

RemoteExperienceAgentVersion     :

RemoteExperienceAgentBuildNumber : 29075

$hvDesktops[0].User

---

Id

--

UserOrGroup/Uy0xLTUtMjEtMTIyNTE4NzgzNy0zDCD5OTM5NOk5PTIzOTEzNDI1NDktMTIyNTI

I'm not sure what the contents of the Id field means and how I would go about converting this to an English name or AD account. (I have changed a few digits in the results in case they are sensitive)

0 Kudos
1 Reply
LucD
Leadership
Leadership

Afaik this is an internal identifier, and I'm not sure if there is a documented method to analyse what is in the ID.

The API documentation for the DesktopInfo object only seems to mention that it is a "Client reference to a specific desktop instance"

But no further explanation on the actual value in there.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos