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.
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.
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.