PlainVan1lla
Contributor
Contributor

How to obtain host computer's name from within virtual machine

My users run on VMware Horizon Client 5.5.0.  From within the virtual machine, how would I get the name of the host computer?  Preferably in a command line where I can capture the output to a text file.  I see that the Z: drive is mapped to {username} on {computername}.  I thought NET USE would give me the info but it misses the Z: drive altogether.  If I issue NET USE Z:  I would get

 

Local name = Z:

Remote name = \\tsclient\{username|

Resource type = Disk

 

I suppose TSCLIENT is some variable defined within the Horizon virtual machine.  How would I get that name though?

 

Labels (3)
Reply
0 Kudos
Mickeybyte
Hot Shot
Hot Shot

@PlainVan1lla 

From within the virtual machine, you can read the following registry value that contains the client hostname: 

HKCU\Volatile Environment\ViewClient_Machine_Name

A lot of information can be found in that key: Client System Information Sent to Remote Desktops (vmware.com)


Regards,
Mickeybyte (ITPro blog)

If you found this comment useful or an answer to your question, please mark as 'Solved' and/or click the 'Kudos' button, please ask follow-up questions if you have any.

View solution in original post

PlainVan1lla
Contributor
Contributor

Thank you!  You answered my question!

Reply
0 Kudos