How to count or know the number of people / connected session to the DC ?

Posted on 2011-10-31
Last Modified: 2012-05-12

I'd like to know if it is possible to get the number of user or session connected to the WIndows Server 2008 domain controller if possible ?

    LVL 13

    Assisted Solution

    Hi, You can start with this link:
    Basically you need to take the data from some performance counters with Get-Counter (only in v2) or Get-WmiObject (v1 & v2).
    What you want to query is up to your needs.
    LVL 5

    Accepted Solution

    Get-WMIObject Win32_PerfFormattedData_TermService_TerminalServices -ComputerName computer_name |select *se*

    replace computer_name with the DC name
    Get-WMIObject Win32_PerfFormattedData_TermService_TerminalServices -ComputerName computer_name |select *se*

    Open in new window

    LVL 7

    Assisted Solution

    The best & easiest command. That's what I prefer to use...

    C:\>qwinsta /?
    Display information about Terminal Sessions.

    QUERY SESSION [sessionname | username | sessionid]
                  [/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]

      sessionname         Identifies the session named sessionname.
      username            Identifies the session with user username.
      sessionid           Identifies the session with ID sessionid.
      /SERVER:servername  The server to be queried (default is current).
      /MODE               Display current line settings.
      /FLOW               Display current flow control settings.
      /CONNECT            Display current connect settings.
      /COUNTER            Display current Terminal Services counters information.

    Good Luck..!!
    LVL 17

    Assisted Solution

    by:James Haywood
    You can use the Remote Desktop Services Manager (2008). This gives you a list of all sessions and the ability to disconnect them

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
    OfficeMate Freezes on login or does not load after login credentials are input.
    This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
    To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now