Find localized name of a the LocalSystem account (NT AUTHORITY\SYSTEM)

  • Thread starter Thread starter Boaz Ben-Porat
  • Start date Start date
B

Boaz Ben-Porat

We need to find the localized name of the LocalSystem account. Onenglish
windows it is 'NT AUTHORITY\SYSTEM', but on other OSs it is something else.
(e.g. In German it is 'NT AUTHORITÄT\SYSTEM )

The SID of the LocalSystem account is S-1-5-18', so we tried using
Win32_Group class/table with SID='S-1-5-18' (On an english Windows). The
Name property is 'SYSTEM', but 'NT AUTHORITY' is not found in any member of
the Win32_Group.

How do we get the full name of an account?

TIA

Boaz Ben-Porat
Milestone systems
 
Boaz Ben-Porat said:
We need to find the localized name of the LocalSystem account. Onenglish
windows it is 'NT AUTHORITY\SYSTEM', but on other OSs it is something else.
(e.g. In German it is 'NT AUTHORITÄT\SYSTEM )

The SID of the LocalSystem account is S-1-5-18', so we tried using
Win32_Group class/table with SID='S-1-5-18' (On an english Windows). The
Name property is 'SYSTEM', but 'NT AUTHORITY' is not found in any member of
the Win32_Group.

How do we get the full name of an account?

TIA

Boaz Ben-Porat
Milestone systems


Try Win32_SID. This class can not be enumerated, so you can't use a query.
This code gives "NT AUTHORITY\SYSTEM" (I can't test it on a localized Windows
system)


' VBScript source code

Set objWMI = GetObject _
("winmgmts:root\cimv2")

Set objSid = objWMI.Get _
("Win32_SID.SID='S-1-5-18'")

WScript.Echo objSid.ReferencedDomainName _
& "\" & objSid.AccountName
 
Back
Top