Gets one or more Active Directory organizational units

Description

The Get-ADOrganizationalUnit cmdlet gets an organizational unit (OU) object or performs a search to get multiple OUs.

This cmdlet gets a default set of OU object properties. To get additional properties, use the Properties parameter. For more information about the how to determine the properties for computer objects, see the Properties parameter description.

 

Examples:
Get all of the OUs in a domain
Get-ADOrganizationalUnit -Filter ‘Name -like “*”‘ | Format-Table Name, DistinguishedName -A

Get child OUs
Get-ADOrganizationalUnit -LDAPFilter ‘(name=*)’ -SearchBase ‘OU=Sales,OU=UserAccounts,DC=FABRIKAM,DC=COM’ -SearchScope OneLevel | Format-Table Name,Country,PostalCode,City,StreetAddress,Stat

15 Comments

  1. We are a gaggle of volunteers and starting a brand new scheme in our community. Your site offered us with useful info to paintings on. You have performed an impressive task and our whole group shall be grateful to you.

  2. Virtually all of whatever you point out is astonishingly appropriate and that makes me ponder why I had not looked at this in this light before. This particular piece truly did turn the light on for me as far as this subject matter goes. But at this time there is 1 position I am not too comfortable with so whilst I make an effort to reconcile that with the main idea of the position, let me see just what all the rest of your subscribers have to say.Very well done.

Leave a Reply

Your email address will not be published.