Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Script that shows specific user is logged into a list of servers. The script I have shows all RDC sessions.

$
0
0

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)

{

$server

$command = “quser /server:” + $server

invoke-expression $command

}

Viewing all articles
Browse latest Browse all 6937

Trending Articles