Содержание

Get-OrganizationalUnit

Создать Organization Unit

New-ADOrganizationalUnit -Name "Users" -Path “OU=KZN,OU=RU,DC=resource,DC=loc” –Description “Контейнер для пользователей Казани” -PassThru

Получить список

Get-ADOrganizationalUnit -LDAPFilter '(name=*)' -SearchBase 'OU=South_America,DC=BIGFIRM,DC=BIZ' -SearchScope OneLevel
| select distinguishedname
 
Get-ADOrganizationalUnit -Filter 'Name -like "*"' | FT Name, DistinguishedName -A
 
Get-ADOrganizationalUnit -LDAPFilter '(name=*)' -SearchBase 'OU=Sales,OU=UserAccounts,DC=FABRIKAM,DC=COM' `
-SearchScope OneLevel | ft Name,Country,PostalCode,City,StreetAddress,State
Get-OrganizationalUnit "North America" -SingleNodeOnly | Format-Table Name, DistinguishedName
Get-OrganizationalUnit -SearchText "Executives" | Format-Table Name, DistinguishedName

Получить свойства OU

Переименовать OU

Удалить OU