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

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
 
U

urkec

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top