VMware Horizon Community
esardinha08
Contributor
Contributor

View Client IP

Hello Everyone,

I have been tasked with figuring out a way to write a script that prompts you to enter a computer name and have it output the remote client IP address.  We are using Windows 7 desktops with zero clients.  Two manual ways of getting the remote IP other than disconnecting the user from their session is opening a command prompt and typing the "set" command and use remote regedit and navigating to the users SID>volatile environment.  Are there any scripting gurus out there that can script this so that it prompts for the computer name so we find the remote clients ip without going through all these steps for multiple computers?

If you need more info please let me know.

Thank You!

Reply
0 Kudos
5 Replies
CameronUBC
Enthusiast
Enthusiast

I haven't done this before, but my first thought would be to keep it simple and to set a scheduled task for the currently logged on user at logon or unlock of a computer to echo "%ViewClient_Broker_Remote_IP_Address% logging into %COMPUTERNAME%"  >> \\path\to\logfile.txt. Then you don't have to worry about creating an interface or program to do lookups. Just make a copy of the text file (so as not to lock it) and do a search.

esardinha08
Contributor
Contributor

Thanks, that was helpful but I need a more interactive way where you get a prompt to enter the desktop name so you can connect and have it display the view client ip.

Reply
0 Kudos
CameronUBC
Enthusiast
Enthusiast

You could use my suggestion of writing the computer name and view connection client ENV variable to a file (probably easiest as CSV) and write a powershell GUI program to open the CSV file, open up a new windows form, search the CSV for the computer name and take the last result, and output that value to the user in less than 30 lines of code.

Reply
0 Kudos
orthohin
Enthusiast
Enthusiast

Please have a look.......

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101793...

Regards,
Milton

Never trust a computer you can't throw out a window
Reply
0 Kudos
marcdrinkwater
Enthusiast
Enthusiast

You could maybe use backinfo ( http://www.msdonkey.com/server/backinfo-desktop-background/ ) to output the connecting device volatile information to the desktop?

Reply
0 Kudos