# Powershell remoting timeout

**URL:** <https://forums.powershell.org/t/powershell-remoting-timeout/2302>\
**Category:** PowerShell Help\
**Created:** [March 3, 2014, 3:35am UTC](https://forums.powershell.org/t/powershell-remoting-timeout/2302 "2014-03-03T03:35:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliadams1981](https://avatars.discourse-cdn.com/v4/letter/o/8baadc/32.png) [@oliadams1981](https://forums.powershell.org/u/oliadams1981)\
**Post date:** [March 3, 2014, 3:35am UTC](https://forums.powershell.org/t/powershell-remoting-timeout/2302/1 "2014-03-03T03:35:56Z")

</div>

I am trying to return all the users in active directory from a remote computer. I am using the Quest AD Cmdlets. The search finds 300 users and then hangs and the message I get back is this:

The operation was aborted because the client side timeout limit was exceeded.  
+ CategoryInfo : NotSpecified: (🙂 [Get-QADUser], LdapException  
+ FullyQualifiedErrorId : System.DirectoryServices.Protocols.LdapException,Quest.ActiveRoles.ArsPowerShellSnapIn.Powershell.Cmdlets.GetUserCmdlet.

I am guessing there is a faster way, what is the best practice for extracting this data? the end result is to import the data into sql.

Thanks in advance for any information.

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [March 3, 2014, 4:35am UTC](https://forums.powershell.org/t/powershell-remoting-timeout/2302/2 "2014-03-03T04:35:58Z")

</div>

That’s a built-in defense mechanism in AD. You’re asking for, potentially, a LOT of data, and it costs the DC a lot to produce it, transmit it, and so on. Your client then has a lot of resources in holding the information.

I’m less familiar with the Quest cmdlets, but looking at [http://wiki.powergui.org/index.php/Get-QADUser](http://wiki.powergui.org/index.php/Get-QADUser), there’s a -pagesize parameter which probably lets you modify the size of the result page that’s sent over. Also a -SizeLimit parameter you might look at.

Usually, I suggest that folks query on an OU-by-OU basis, or query everyone whose names start with A, then B, and so on - just to break the operational down into more manageable chunks. But you should be able to use -PageSize. For example, if you set -PageSize to 100, you get back 100 objects. If you execute the command again, you get the NEXT 100 objects. And so on.

---

<div class="post-metadata">

**Author:** ![oliadams1981](https://avatars.discourse-cdn.com/v4/letter/o/8baadc/32.png) [@oliadams1981](https://forums.powershell.org/u/oliadams1981)\
**Post date:** [March 3, 2014, 4:59am UTC](https://forums.powershell.org/t/powershell-remoting-timeout/2302/3 "2014-03-03T04:59:02Z")

</div>

Thanks for the fast and great reply. You always seem to make everything sound so simple 😃 Is there a way to cycle through letters like numbers in a foreach loop for(a-z)? Otherwise would I just loop until it returns null if I want to use pagesize?

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [March 3, 2014, 5:00am UTC](https://forums.powershell.org/t/powershell-remoting-timeout/2302/4 "2014-03-03T05:00:33Z")

</div>

(BTW, know also that this has nothing to do with Powershell Remoting… it’s an AD thing)

I’d just use the pagesize, yeah.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:52pm UTC](https://forums.powershell.org/t/powershell-remoting-timeout/2302/5 "2024-05-16T20:52:23Z")

</div>


