How can I check if a specific user is logged in on a specific computer on my active directory network? I am administrator in this network and would prefer to do it with powershell but I am open to other options.
Here's a little function I whipped up to do this natively in powershell, without requiring PSLoggedOn.
It's very rough and could certainly use some polish, but it demonstrates the important information: use Get-WmiObject and query the Wim32_ComputerSystem class for the username property.
Unfortunately I think this is only accurate for locally logged on users -- you won't be able to see if a person is logged in over RDP with this method.
Here's the code:
I have created a powershell function based on this link. It shows some text of the psloggedon command that I still don't know how to remove and the function has a loot of room for improvement... But it works, so HTH somebody else.