Scripting Question

Custom Inventory Rule for Local Admins using SID instead of group name

02/28/2018 829 views

We have been able to successful add a Custom Inventory Rule and get the list of local admins per machine with the following

ShellCommandTextReturn(net localgroup Administrators)

the only issue we are getting is as a global company some of the local languages are not English, and are therefore not able to find the "Adminstrators" group.

Rather than have different rules with different languages (which is not a terrible workaround, but not flawless) I wondered if we could modify the statement to look for SID: S-1-5-32-544 instead of the group name "Administrators".

Any thoughts?


1 Comment   [ + ] Show comment


  • I'm not on a Windows PC at the moment but you should be able to loop the output of net local group Administrators and compare to the sub-keys located in the registry under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Be the first to answer this question

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ