Jump to content

Script Terminal Services - Total Sessions Created


Recommended Posts

Posted

How can I script (in VBScript, C#.NET, or PowerShell) the following.

 

I'm looking for the total sessions created (since the last reboot).

 

Thus far, I have only been able to get this number by running QWINSTA

/COUNTER and checking the "Total Sessions Created" value.

 

NOTE: this number is not equal to the total number of active and inactive

sessions

  • Replies 2
  • Created
  • Last Reply
Guest Soo Kuan Teo [MSFT]
Posted

Re: Script Terminal Services - Total Sessions Created

 

You can try WMI Win32_TerminalService.TotalSessions property.

http://msdn.microsoft.com/en-us/library/aa383639(VS.85).aspx

Thanks

Soo Kuan

 

 

--

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

 

"Mike" <Mike@discussions.microsoft.com> wrote in message

news:A212527B-FE14-4AF0-9983-1A22C577C119@microsoft.com...

> How can I script (in VBScript, C#.NET, or PowerShell) the following.

>

> I'm looking for the total sessions created (since the last reboot).

>

> Thus far, I have only been able to get this number by running QWINSTA

> /COUNTER and checking the "Total Sessions Created" value.

>

> NOTE: this number is not equal to the total number of active and inactive

> sessions

Posted

Re: Script Terminal Services - Total Sessions Created

 

The WMI Win32_TerminalService.TotalSessions property is the total number of

sessions currently on the server. This includes both connected and

disconnected sessions. This is not the same value as the total sessions

created (since the last reboot) which is provided by Qwinsta /counter and

checking the "Total Sessions Created" value.

 

 

 

 

"Soo Kuan Teo [MSFT]" wrote:

> You can try WMI Win32_TerminalService.TotalSessions property.

> http://msdn.microsoft.com/en-us/library/aa383639(VS.85).aspx

> Thanks

> Soo Kuan

>

>

> --

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

>

> "Mike" <Mike@discussions.microsoft.com> wrote in message

> news:A212527B-FE14-4AF0-9983-1A22C577C119@microsoft.com...

> > How can I script (in VBScript, C#.NET, or PowerShell) the following.

> >

> > I'm looking for the total sessions created (since the last reboot).

> >

> > Thus far, I have only been able to get this number by running QWINSTA

> > /COUNTER and checking the "Total Sessions Created" value.

> >

> > NOTE: this number is not equal to the total number of active and inactive

> > sessions

>

>


×
×
  • Create New...