The script below lists all users that have open RDC sessions on a list of servers.I need it to just list any from a specific person. Could anyone help...
$servers = get-content “C:\scripts\servers.txt”
foreach ($server in $servers)
$command = “quser /server:” + $server
That's pretty simple. Add this line above the quser line:
"----- $computer -----"
Is there any way to add a Log Off command to this script?
im rubbish at scripting - hence on here trying to learn but.....
using the quser output above you just need the sessionID, and this command:
logoff 2 /server:servername
hopefully someone else on here can say how to do it as that would be useful for me too.....if not give me 6 months or so.
Powered by IDERA