I would also like to parse the output of qwinsta via vbscript. However, I am
not sure how to accomplish this in order to show only "rdp-tcp#" or
"ICA-tcp#". CAn you please show an example?

"atavachron" wrote:

> Personally, I find it easier to parse the output of qwinsta.exe via
> vbscript. IIRC it's only available from winXP on, though.
>
> regards,
> alejandro
>
> On Oct 11, 9:00 am, Claude Lachapelle
> <ClaudeLachape...@xxxxxx> wrote:

> > Could you told me how I could distinguish between local console & remote
> > desktop sessions:
> >
> > Z:\Sysinternals\PSTools>psloggedon \\server01
> >
> > loggedon v1.33 - See who's logged on
> > Copyright ® 2000-2006 Mark Russinovich
> > Sysinternals -www.sysinternals.com
> >
> > Users logged on locally:
> > Error: could not retrieve logon time
> > NT AUTHORITY\LOCAL SERVICE
> > Error: could not retrieve logon time
> > NT AUTHORITY\NETWORK SERVICE
> > 10/10/2007 1:56:38 PM DOMAIN1\user1
> > 09/10/2007 10:20:43 AM DOMAIN1\user2
> > Error: could not retrieve logon time
> > NT AUTHORITY\SYSTEM
> >
> > Users logged on via resource shares:
> > 11/10/2007 8:37:51 AM DOMAIN1\user3
> >
> > About the QUERY command, thanks for the information, I was not aware of this
> > server utility -- if I could'n find a way to VBScript the equivalent, I will
> > run it remotely.
> >
> > Thanks."Pegasus (MVP)" wrote:

> > > What you report is incorrect: psloggedon.exe will distinguish
> > > clearly between console and remote sessions.
> >

> > > If you're unable to solve your problem with scripting then
> > > you could use these commands to distinguish between active
> > > and idle sessions:
> >

> > > query user
> > > query session
> >

> > > There is more help here:
> > >http://www.microsoft.com/windows2000...ault.asp?url=/....
> >

> > > "Claude Lachapelle" <ClaudeLachape...@xxxxxx> wrote in
> > > messagenews:BC7DAF6C-9FA3-4F81-BCEA-5EB155BB3DCF@xxxxxx
> > > > Usefull, but not enough, it is not giving us if it's at the console or via
> > > > Remote Desktop, and if the session is active or idle/disconnected.
> >

> > > > I'm pretty sure we can get this information by using the WMI provider....
> > > > still searching.
> >

> > > > Thanks.
> >

> > > > "Pegasus (MVP)" wrote:
> >

> > > >> "Claude Lachapelle" <ClaudeLachape...@xxxxxx> wrote in
> > > >> messagenews:0C0BA5E7-23AD-4806-97CD-159201BB5881@xxxxxx
> > > >> > Hi!
> >

> > > >> > I would like to write down a script that will enumerate all users
> > > >> > actually
> > > >> > connected on all our servers via Remote Desktop (active, inactive,
> > > >> > disconnected) and on their consoles, to find out where administrators
> > > >> > forget
> > > >> > to logoff, and this way avoid having problem with terminal licensing (2
> > > >> > connections allowed only) and console locked!
> >

> > > >> > Does somebody already wrote down something doing that?
> >

> > > >> > Thanks.
> >

> > > >> > Claude Lachapelle
> > > >> > Systems Administrator, MCSE
> >

> > > >> You could use psloggedon.exe fromwww.sysinternals.com.
>
>
>
>