Powershell for detecting user sessions in Windows Server 2008


I would like to know if I can use powershell to detect if a session is currently running on a Windows Server 2008 and if their isn't to automatically launch one using a specified username/password. If anyone can point to some commands or examples that 'mimck' what I am looking for it would be very much appreciated.

Thank you.
ZackGeneral IT Goto GuyAsked:
Who is Participating?
David Johnson, CD, MVPOwnerCommented:
get the powershell community extensions

Get-TerminalSession | where winstation -eq "console"
Will tell you which users have console sessions
ZackGeneral IT Goto GuyAuthor Commented:
Cheers for that I got a working template now.
ZackGeneral IT Goto GuyAuthor Commented:
Thank you
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.

All Courses

From novice to tech pro — start learning today.