From: Mike on
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
From: Soo Kuan Teo [MSFT] on
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(a)discussions.microsoft.com> wrote in message
news:A212527B-FE14-4AF0-9983-1A22C577C119(a)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

From: Mike on
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(a)discussions.microsoft.com> wrote in message
> news:A212527B-FE14-4AF0-9983-1A22C577C119(a)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
>
>