Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get last logon user id on PC

$
0
0
(Get-WmiObject Win32_ComputerSystem -ComputerName $ip).UserName will return domain\logonID of the user who is currently logging on $ip. Is there simple way like above to return domain\logonID of the user who logged on $ip last time?

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>