PowerShell PowerShell $Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" Get-ItemProperty -Path $Path | Select-Object -ExpandProperty LastLoggedOnUser 123 $Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" Get-ItemProperty -Path $Path | Select-Object -ExpandProperty LastLoggedOnUser