Get OUs from current domain with LDAP ADs path
Get OUs from another domain with LDAP ADs path
Get-NetOU -Domain <DOMAIN NAME>
Get OUs from current domain with all properties
Get OUs from another domain with all properties
Get-NetOU -Domain <DOMAIN NAME> -FullData
Get list of computers from specific OU of current domain
Get-NetOU <OU NAME> | %{Get-NetComputer -ADSPath $_ }
Get gplink of all OUs from current domain
(Get-NetOU -FullData).gplink.split(";")[0] -replace "^." |
Get gplink of all OUs from another domain
(Get-NetOU <OU NAME> -FullData).gplink.split(";")[0] -replace "^."
Active Directory Module
Get OUs from current domain with default properties
Get OUs from another domain with default properties
Get OUs from current domain with all properties
Get OUs from another domain with all properties