![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Retrieve Number of remote Terminal Server users Looking for something at will just output "There are 32 users on Server1". If it was possbile to GET from a test file with server names so it would just read: There are 35 users on Server1 There are 15 users on Server2 There are 32 users on Server3 There are 45 users on Server4 There are 31 users on Server5 That would be awesome. Thanks in advance- |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Retrieve Number of remote Terminal Server users You can use Win32_PerfFormattedData_TermService_TerminalServices for This Get-WMIObject Win32_PerfFormattedData_TermService_TerminalServices It has these useful properties ActiveSessions : 1 InactiveSessions : 1 TotalSessions : 2 Here is an Example Script foreach($server in (Get-Content $file)) { $count = (Get-WMIObject Win32_PerfFormattedData_TermService_TerminalServices).TotalSessions "There are {0} users on {1}" -f $count,$Server } "Ian_1" <fakeaddy@xxxxxx> wrote in message news:0031F476-6BE1-4462-A090-8E212B3BC5F1@xxxxxx Quote: > Looking for something at will just output "There are 32 users on Server1". > If > it was possbile to GET from a test file with server names so it would just > read: > There are 35 users on Server1 > There are 15 users on Server2 > There are 32 users on Server3 > There are 45 users on Server4 > There are 31 users on Server5 > > That would be awesome. Thanks in advance- > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Terminal Server/Remote Dektop won't see local network printer in Vista | Network & Sharing | |||
| How can I check status of Terminal Services connections on remote server? | PowerShell | |||
| CAL for Windows Server 2008 in a Terminal Server environment | .NET General | |||
| remote desktop connection to my terminal server | Vista General | |||
| Remote Desktop Probem - Vista to Terminal Server 2003 | Vista General | |||