Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/future4tech/public_html/wp-includes/functions.php on line 6114
Query User / QUSER – Windows CMD Command - Future4Tech

Query User / QUSER – Windows CMD Command

Display information about user sessions on a Terminal Server or a Remote Desktop Session Host (RD Session Host) server.

Syntax
      QUERY USER [/server:ServerName]

      QUERY USER UserName [/server:ServerName]

      QUERY USER [SessionName | SessionID] [/server:ServerName]

Key
   UserName    The logon username of the user whose sessions you want to query.

   SessionName The name of the session that you want to query.

   SessionID   The ID of the session that you want to query.

   /server:ServerName
               The Remote Desktop Session Host server to query.
               The default is the current server.

   /?          Display help.

QUSER is a synonym for QUERY USER

Query User returns the following information:

  • The name of the user
  • The name of the session on the RD Session Host server
  • The session ID
  • The state of the session (active or disconnected)
  • The idle time (the number of minutes since the last keystroke or mouse movement at the session)
  • The date and time the user logged on

If you do not specify a user by using UserNameSessionName, or SessionID, a list of all users who are logged on to the server is returned. Alternatively, use a query session to display a list of all sessions on the server. When information for multiple users is returned, a greater than > symbol is displayed before the current session.

A user can always query the session to which the user is currently logged on. To query other sessions, the user must have Query Information special access permission.

The User Access permission type grants the following special permissions: Query Information, Logon, and Connect. These special permissions allow a user to Log on to a session on the terminal server. Query information about a session. Send messages to other user sessions. Connect to another session.

Permissions are set under:

Terminal Services Configuration | Connections | Properties | Permissions | Advanced | Permissions

Powershell

When running quser under Powershell it is useful to split the output into rich objects, this can be done with a regex and ConvertFrom-CSV:

Examples

Display information about all users logged on the system:

C:\> query user

Display information about the user ursula on serverF4T:

C:\> quser ursula /server:ServerF4T

You may also like...

7 Responses

  1. Links.M106.COM says:

    Interesting, I am curious what the statistics are on your first point there

  2. Budowa Pianina says:

    Wow das is Good, awesome blog layout! How long have you been posting for? you make blogging look easy. The overall look of your site is super-wonderful, as well as the content unit!

  3. Pianino Muzyka says:

    Wow, I had been lucky to locate this website when I was looking for some information on Bing! Keep up the great work!

  4. Google UltraFan:) says:

    Pretty! This was a really wonderful post. Thanks for supplying this info.

  5. zortilonrel says:

    I?¦ve recently started a blog, the information you offer on this web site has helped me tremendously. Thanks for all of your time & work.

  6. Kelsey says:

    Thank you for the auspicious writeup. It in fact was
    once a entertainment account it. Look advanced to more delivered agreeable from you!
    By the way, how can we be in contact?

Leave a Reply

Your email address will not be published. Required fields are marked *


Notice: ob_end_flush(): Failed to send buffer of zlib output compression (0) in /home/future4tech/public_html/wp-includes/functions.php on line 5464