Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FindandFixADObjectswithStaleAdminSDHolder.ps1 re-queries each admin group for every flagged object #7

Open
mcdonamw opened this issue Mar 28, 2023 · 0 comments

Comments

@mcdonamw
Copy link

Every group in $default_admin_groups are queried via Get-ADGroup for every flagged object in the domain. As a result, with large numbers of admin groups and/or flagged objects, this can take a very long time to run.

It would be more efficient to pull all members of those admin groups into a collection of some sort and that collection queried for presence of the flagged object vs a new call to Get-ADGroup each time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant