<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Use the DirectorySearcher .NET Class and PowerShell to Search Active Directory</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/23/use-the-directorysearcher-net-class-and-powershell-to-search-active-directory.aspx</link><description>Summary : Learn how to search Active Directory Domain Services from Windows PowerShell by using the DirectorySearcher .NET class. 
 
 
 Hey Scripting Guy! I am curious about searching Active Directory Domain Services (AD DS) from Windows PowerShell</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Use the DirectorySearcher .NET Class and PowerShell to Search Active Directory</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/23/use-the-directorysearcher-net-class-and-powershell-to-search-active-directory.aspx#3456413</link><pubDate>Thu, 29 Sep 2011 19:15:14 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3456413</guid><dc:creator>Ed Wilson</dc:creator><description>&lt;p&gt;@Chris128 you are absolutely correct. By default, it returns 1000 objects. To move past 1000 requires one to set the pagesize property as you indicated. By the way, this is the same way it worked in VBScript as well.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3456413" width="1" height="1"&gt;</description></item><item><title>re: Use the DirectorySearcher .NET Class and PowerShell to Search Active Directory</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/23/use-the-directorysearcher-net-class-and-powershell-to-search-active-directory.aspx#3352722</link><pubDate>Mon, 30 Aug 2010 20:07:54 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3352722</guid><dc:creator>Chris128</dc:creator><description>&lt;p&gt;I&amp;#39;ll be honest I dont know exactly how powershell works with .NET but I will assume its the exact same .NET code that ends up getting run as if you were to write a native .NET application, so I just thought I would point out something that has caught me out in the past when working with the DirectorySearcher class. &lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t set the PageSize property (or if you explicitly set it to 0) then you will probably find that your search never returns more than 1000 results even if it should have. To resolve this you just need to set the PageSize property to 1000 and then the DirectorySearcher class will perform a paged search. The end result being that when it hits its 1000 item page limit it will request the next &amp;quot;page&amp;quot; automatically and your search will therefore get the full results list.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3352722" width="1" height="1"&gt;</description></item></channel></rss>