Author Posts

July 30, 2018 at 11:29 am

ERROR :- Get-ADGroupMember : The operation returned because the timeout limit was exceeded.

Any idea to fix this? I'm trying to pull out a list of members who are part of a group.

July 30, 2018 at 1:15 pm

If the number of returned objects is too large, the DC will cut off the operation and you'll run into the timeout. This isn't "broken," it's by design in those cases.

July 30, 2018 at 1:57 pm

Off course the number of objects here are large, so please help me how do I get that information out to csv

July 30, 2018 at 7:26 pm

Heyyy.. we get it… this is a PTA for you.. but no reason to get snippy. 8^}

This is a normal thing and not PS specific. This has been talked about a lot, for many years now. This is just how ADDS is when you make calls to it asking for a bunch of stuff. Thus this is really a ADDS 101 question, and not a PS one. Yet, we've all experienced this at one time or the other.

For example, unless you change things at the AD level, it's only going to give you 1000 – 5000 objects, no matter how many above the 1-5K you have. You could split your AD calls into chunks and append to a CSV file.

To get more you have to change the setting, think differently. There are approaches to deal with this as discussed in many articles all over the web with some workarounds noted. Just searching with you post title, would return to you a very long list.

Example(s):
'mctexpert.blogspot.com/2013/07/how-to-exceed-maximum-number-of-allowed.html'
'experts-exchange.com/questions/28278645/Powershell-Get-ADGroupMember-The-size-limit-for-this-request-was-exceeded.html'
'stackoverflow.com/questions/47417907/error-get-aduser-the-operation-returned-because-the-timeout-limit-was-exceed'
'stackoverflow.com/questions/39400834/active-directory-operation-timeout-limit-exceeded-on-one-dc-but-not-on-another'
'techtips.tv/powershell/powershell-get-active-directory-username-and-email-address-of-all-group-members'

July 30, 2018 at 8:03 pm

Have you tried a command like this?

$var = Get-ADGroup "Enter-Group-Name-Here" -Properties Member | Select -ExpandProperty Member