Scroll Top

Get current logged on user of a machine remotely

FI_Post_PowerShell

In this post I will show how you can remotely discover which user is logged onto a particular workstation in your environment.

Open PowerShell and run:

PowerShell
Get-WmiObject –ComputerName WORKSTATION-HOSTNAME –Class Win32_ComputerSystem | Select-Object UserName

 

Replace ‘WORKSTATION-HOSTNAME’ with the hostname of the workstation that you are retrieving the current logged on user for.