Skip to content

Make group membership check language agnostic#1007

Merged
bill-long merged 3 commits into
mainfrom
bilong-adgroups
May 9, 2022
Merged

Make group membership check language agnostic#1007
bill-long merged 3 commits into
mainfrom
bilong-adgroups

Conversation

@bill-long

@bill-long bill-long commented May 9, 2022

Copy link
Copy Markdown
Contributor

Fixes #1006.

  • Add a helper function to retrieve the SIDs of well-known AD groups such as Enterprise Admins and Schema Admins.
  • Change SetupAssist to use IsInRole rather than parsing the whoami output. We could continue parsing the whoami and look for the SIDs, but IsInRole seems like a cleaner way to do this.

Note that Get-WellKnownGroupSid returns the SID for the Domain Admins group which resides in the domain that the computer is joined to. Is there a scenario where we would want a different Domain Admins SID?

I tested the helper function on a Spanish forest and it works, but I don't have Exchange installed in this forest to do a full test:

PS C:\> Get-WellKnownGroupSid "Enterprise Admins"
S-1-5-21-26643861-2199645782-2938786794-519
PS C:\> (New-Object System.Security.Principal.SecurityIdentifier(Get-WellKnownGroupSid "Enterprise Admins")).Translate([System.Security.Principal.NTAccount])

Value
-----
ESDOM\Administradores de empresas

Example CSV output in the successful case:

image

@bill-long
bill-long merged commit 6157377 into main May 9, 2022
@bill-long
bill-long deleted the bilong-adgroups branch May 9, 2022 21:14
@dpaulson45 dpaulson45 added Enhancement New feature or request Setup Setup tools issue Setup Assist This item is for local server settings and environment checks that cause issues for setup labels May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Setup Assist This item is for local server settings and environment checks that cause issues for setup Setup Setup tools issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue] SetupAssist fails to check for "member of" in different language

2 participants