Saw an interesting question about user logon time. How can you tell the logged on user and when they logged on
$logon = Get-CimInstance -ClassName Win32_LogonSession |
sort StartTime -Descending |
select -First 1
$user = Get-CimAssociatedInstance… Read the full text.