October 12, 2018 at 1:01 am
ForEach ($Group in (Get-Content c:\text.txt)) { Get-ADGroupMember $Group | Select @{Label="Group";Expression={$Group.Name}},Name,SamAccountName }
I have the above piece of powershell code which displays Group,name and samaccountname in the window.
Sometime I get this error "Get-ADGroupMember : The size limit for this request was exceeded" and the results continue thereafter.
How can I ignore that error and also include all those members which belong to that relevant group causing this error.
I would like to export the results into a tab delimited text extract.
Thanks
October 12, 2018 at 5:11 pm
mtz676 - Friday, October 12, 2018 1:01 AMForEach ($Group in (Get-Content c:\text.txt)) { Get-ADGroupMember $Group | Select @{Label="Group";Expression={$Group.Name}},Name,SamAccountName }I have the above piece of powershell code which displays Group,name and samaccountname in the window.
Sometime I get this error "Get-ADGroupMember : The size limit for this request was exceeded" and the results continue thereafter.How can I ignore that error and also include all those members which belong to that relevant group causing this error.
I would like to export the results into a tab delimited text extract.Thanks
It's an issue with the AD web service. There are a couple of different work arounds you can try in this thread (change the config file or change the code):
How do I resolve the "Size limit exceeded for Get-Adgroupmember" error when listing a group with thousands of members?
Sue
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply