Get-ADOrganizationalUnit
SafeList OUs
Get-ADOrganizationalUnit -Filter *
Maps the OU tree — confirm where objects live and where GPOs link. Handy for DN lookups.
Examples
Get-ADOrganizationalUnit -Filter * | select Name,DistinguishedNameOUs with their DNs
Syntax
Get-ADOrganizationalUnit [-Filter expr] [-SearchBase dn]
Before you run it
Read only.
Related commands
- dsqueryQuery AD objects
- Move-ADObjectMove objects between OUs
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store