Custom Inventory Rule for Local Admins using SID instead of group name
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?
Thanks
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 - flip1001 6 years ago
Answers (0)
Please log in to answer
Be the first to answer this question