Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Getting ClientName from Terminal Server

Featured Replies

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

  • Author

Unfortunately, no.

The closest thing it gives to client name is session name (RDP-TCP#xx), but I need the actual host name that the client is connected from.

  • Author

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.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.