Jump to content

Recommended Posts

Posted

Does anyone know if its possible to obtain the Client Name (that is, the host name) of a user connected to a terminal server remotely (with a script or command line tool)? You can obtain this information graphically from the Terminal Services Manager snap-in (see screenshot).

The Query User command (or QWINSTA) only returns the Session Name.

Alternatively, remotely reading the user's %CLIENTNAME% environment variable would work as well.

post-57900-1133377088_thumb.png


Posted

I've tried using those (WTSManager.dll) in a vbs script, and the script works when run from the terminal server itself. But I can't find a way to get the script to work remotely from another computer.

Looking through the article I noticed it mentions using "WTSOpenServer( LPTSTR pServerName)" to connect to a different server, but I haven't had luck getting it to work yet.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...