This Script retrieves information from Active-Directory. It’s got a few Parameters and Switches that allows us to specify what to search for and how to Return the objects found. You can choose which information to return through the Property parameter, you can Save the Information to a Csv file, You can return a System.DirectoryServices.DirectoryEntry Object that you can work with through PowerShell and alot more.
Parameters:
Download link: http://gallery.technet.microsoft.com/ScriptCenter/81865fd8-6bdf-44d6-844b-01f262dc853e/