Tuesday, March 31, 2020

Find a logged-in user remotely using PowerShell

There are numerous different reasons you may need to find out who is logged-in to a remote computer.  For example, say your firewall logs show a machine is doing something out of the ordinary, it might be a good idea to quickly figure out who is using it.

Here is a quick way to find out who that user is using Powershell.

get-wmiobject -ComputerName <computername> -Class Win32_ComputerSystem | Select-Object UserName

No comments: