HASecuritySolutions / HASecuritySolutions/WECComputerGroupMgmt

Get-ADGroupMember limitations

Offen
#2 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PowerShell
Sterne
11
Forks
7
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Line 148:
$members = Get-ADGroupMember -Identity $group
Ff the group membership ever exceeds 5,000, this will break unless configured to allow a higher value. By default this command will only error return would be:

Get-ADGroupMember -Identity
Get-ADGroupMember : The size limit for this request was exceeded
At line:1 char:1
+ Get-ADGroupMember -Identity
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:ADGroup) [Get-ADGroupMember], ADException
+ FullyQualifiedErrorId : ActiveDirectoryServer:8227,Microsoft.ActiveDirectory.Management.Commands.GetADGroupMember

Once the first group fails to return group membership it could assign the devices to other groups until eventually all devices are assigned to all groups. This could really come into play with lifecycle replacements when new devices are added into the environment and the old groups remain. For example:
4k systems are normally assigned to 4 groups for 16k devices.
4k systems or 25% of the environment is staged for lifecycle replacement and the old/new devices are in AD at the same time.
Once a device group has 5001 devices due to this temporary balloon of assets this will start to break. This would require changes to the MaxGroupOrMemberEntries setting in every domain controller. This limitation applies to:

Get-ADGroupMember
Get-ADPrincipalGroupMembership
Get-ADAccountAuthorizationGroup

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Das Issue verweist auf Zeile 148 und nennt Get-ADGroupMember, Get-ADPrincipalGroupMembership und Get-ADAccountAuthorizationGroup. Beginne damit, den Code um Zeile 148 zu überprüfen und das Verhalten des Größenlimits mit einer Gruppe zu reproduzieren, die mehr als 5.000 Mitglieder hat. Für den Abschluss ist eine definierte Handhabungsstrategie erforderlich, die falsche Geräte-zu-Gruppe-Zuweisungen verhindert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell
Bereich
authorization
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.