Determine last person to log onto windows / default logon
I have had a need to determine the default logon username on a windows machine – but I was remote
So I ran an rdp session to the machine and I pulled up a command line prompt and executed
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnSAMUser