Link to home
Start Free TrialLog in
Avatar of SAM2009
SAM2009Flag for Canada

asked on

PowerShell script to get all users sessions connected in Windows terminal servers

Hi,

I'm trying to do a PowerShell script to get all users sessions connected in Windows terminal servers for 1 week.

So basically I will do schedule job which will run every 1h and takes users session (user name or login) and happen info in a csv file.

How can I do that?
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The "qwinsta" command is for me still the easiest way to collect user sessions.
It's not PowerShell, but can be run in a PS script or just a batch script in the task scheduler.
Avatar of SAM2009

ASKER

Many thanks!