Wednesday, December 5, 2018

Finding Client MAC Address From VMware Horizon VDI Session

Finding VDI Client Device MAC Address From VMware Horizon VDI Session


      While administering VDI environments, most of the time we will struggle to get Thin Client or VDI Client MAC address for troubleshooting, re-imaging or for providing remote shadow support. Below article explains about a simple "visual basic" script to get this information. In my case, I kept this script on network share and configured a Desktop shortcut on all VDI machines.

       When a user connects or reconnects to a View desktop, Horizon Client gathers information about the client system and View Connection Server sends that information to the remote desktop.

       View Agent writes the client computer information to the system registry path "HKEY_CURRENT_USER\Volatile Environment" on VDI desktops.

Registry values:

ViewClient_MAC_Address
ViewClient_IP_Address

Below script will read the HKEY_CURRENT_USER\Volatile Environment\ViewClient_MAC_Address registry parameter and will give Visual Basic output as below screenshot.










''#### VBS Script ####''
On Error Resume Next
Dim objShell, strTemp
Set objShell = WScript.CreateObject("WScript.Shell")
strTemp = "HKEY_CURRENT_USER\Volatile Environment\ViewClient_MAC_Address"
WScript.Echo "VDI Client MAC Address : " & objShell.RegRead(strTemp) 
''### END ####''







No comments:

Post a Comment

Enter Comments...