• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 583
  • Last Modified:

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


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 ?

Senior IT System Engineer
Senior IT System Engineer
4 Solutions
Hi, You can start with this link: http://technet.microsoft.com/en-us/library/dd736504(WS.10).aspx
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.
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

Sushant GulatiConsultantCommented:
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..!!
James HaywoodCommented:
You can use the Remote Desktop Services Manager (2008). This gives you a list of all sessions and the ability to disconnect them
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now