Forum Discussion
Ajay_Kumar_Ghose
Oct 18, 2023Brass Contributor
Getting Timeout limit was exceeded while fetching adgroup member
We have requirement of adding users to multiple ad group, before that check if the user is exist in A group then remove and add to B group. Its working fine smoothly for other AD groups, But still ge...
Oct 18, 2023
How many users are there in the group you are querying?
Ajay_Kumar_Ghose
Oct 19, 2023Brass Contributor
Its contain around 10k users . even when trying to fetch the count of this group. Throwing error that time limit was exceeded.
- Oct 22, 2023
Ajay_Kumar_Ghose You could use this:
Get-ADUser -LDAPFilter "(&(objectCategory=user)(memberof=CN=groupname,OU=Groups,OU=Corp,DC=test,DC=distinguished,DC=local))"
Put that in in variable and test against that
- Ajay_Kumar_GhoseOct 25, 2023Brass ContributorWhen i run this command , There is no error or Output as well. Is there something i missed
- LainRobertsonOct 25, 2023Silver Contributor
From Harm_Veenstra's example, change:
objectCategory=user
To:
objectCategory=person
Or just leave out the "(objectCategory=user)" altogether.
Cheers,
Lain