VMware Horizon Community
PlainVan1lla
Contributor
Contributor
Jump to solution

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)
0 Kudos
1 Solution

Accepted Solutions
Mickeybyte
Hot Shot
Hot Shot
Jump to solution

@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

2 Replies
Mickeybyte
Hot Shot
Hot Shot
Jump to solution

@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.
PlainVan1lla
Contributor
Contributor
Jump to solution

Thank you!  You answered my question!

0 Kudos