Announcement

Collapse
No announcement yet.

Find users logged on with Terminal Server sessions?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Find users logged on with Terminal Server sessions?

    I am trying to find a way to enumerate all the logged on users on Windows systems. I have used WMI to find the local user session if there is one on any windows machine, but I also want to find any users logged on via Terminal sessions on Windows 2003 Terminal Servers.

    I have also used WMI to get all the users who have sessions open, but this includes people who've just used a file share like \\server\share\filename.ext.

    Does anyone know how I can programmatically (or via cmd) find out the users that have Terminal Server Sessions?

  • #2
    Re: Find users logged on with Terminal Server sessions?

    Qwinsta.exe
    Quser.exe

    - Terminal Server Commands
    - Managing Terminal Services Sessions Remotely
    - Audit logon events -> "Logon type"


    \Rems
    Last edited by Rems; 15th November 2007, 11:57. Reason: fixed broken link

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: Find users logged on with Terminal Server sessions?

      But why not just use the Terminal Services Manager console?

      Comment


      • #4
        Re: Find users logged on with Terminal Server sessions?

        Originally posted by Rems View Post
        Qwinsta.exe
        Quser.exe
        These seem to be the same as query session and query user, thanks, that looks like exactly what I need.

        Originally posted by joeqwerty View Post
        But why not just use the Terminal Services Manager console?
        To reiterate the question:
        Originally posted by humbletech99 View Post
        Does anyone know how I can programmatically (or via cmd) find out the users that have Terminal Server Sessions?

        Comment

        Working...
        X