How to find a logged-in user with Powershell remotely


Sometimes I need to see what users are logged-in to a device. Mainly before rebooting it from remotely. I’m doing this trough the following command that is using the WMI instance Win32_ComputerSystem

Just change CLIENT1

Get-WmiObject –ComputerName CLIENT1 –Class Win32_ComputerSystem | Select-Object UserName

2103 Total Views 1 Views Today

Leave a Comment

Leave a Reply