Freigeben über


Get-AD Active-Directory powershell search and export script

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:

  • -Domain Name of the Domain (Required)
  • -OU Name of Organizational Unit (Optional)
  • -User Name of the User (Optional)
  • -Group Name of the Group (Optional)
  • -Computer Name of the Computer (Optional)
  • -Filter Filter on Specified Criteria, default is name (optional)
  • -CustomFilter Create A custom SearchFilter (optional)
  • -CustomAll Create A Custom SerachFilter, searches for All Objects (optional)
  • -Property Specify one or more Properties to Return (Optional)
  • -ToCsv Saves the Output to a Csv File (Optional)
  • -ToObject Returns a System.DirectoryServices.DirectoryEntry Object (optional)
  • -IncreasePageSize Exceeds the default limit of 1000 Objects (optional)
  • -help Prints the HelpFile (Optional)

Download link: https://gallery.technet.microsoft.com/ScriptCenter/81865fd8-6bdf-44d6-844b-01f262dc853e/