Output when run as a SYSTEM user:
PS C:\> PsExec.exe -s C:\netusergetinfo.exe -current
PsExec v2.34 - Execute processes remotely
Copyright (C) 2001-2021 Mark Russinovich
Sysinternals - www.sysinternals.com
2022/06/03 02:00:22 Calling user.Current()
2022/06/03 02:00:22 Current user: &user.User{Uid:"S-1-5-18", Gid:"S-1-5-18", Username:"NT AUTHORITY\\SYSTEM", Name:"SYSTEM", HomeDir:"C:\\Windows\\system32\\config\\systemprofile"}
C:\netusergetinfo.exe exited on AKROH-WINDOWS20 with error code 0.
Output as a regular user:
PS C:\> .\netusergetinfo.exe -current
2022/06/03 02:00:39 Calling user.Current()
2022/06/03 02:00:39 Current user: &user.User{Uid:"S-1-5-21-1844000655-3260516853-2179737697-1000", Gid:"S-1-5-21-1844000655-3260516853-2179737697-513", Username:"AKROH-WINDOWS20\\andrew_kroh", Name:"andrew_kroh", HomeDir:"C:\\Users\\andrew_kroh"}
Fast failure when attempting to get full name of NT AUTHORITY\SYSTEM
.
PS C:\> .\netusergetinfo.exe -username SYSTEM -server-name "NT AUTHORITY"
2022/06/03 02:00:46 Calling NetUserGetInfo("NT AUTHORITY", "SYSTEM", 10, <buf>)
2022/06/03 02:00:46 Exited NetUserGetInfo
2022/06/03 02:00:46 Error:The RPC server is unavailable.