Windows 2025
Sponsored Link

Active Directory : Add Organizational Unit2024/11/29

 

Add Organizational Unit on Active Directory.

[1] Run PowerShell with admin privilege and configure like follows.
# show current Organizational Unit list
PS C:\Users\Administrator> Get-ADOrganizationalUnit -Filter * | Format-Table DistinguishedName 

DistinguishedName
-----------------
OU=Domain Controllers,DC=srv,DC=world
OU=Hiroshima,DC=srv,DC=world

# for example, add [Development01] under the [Hiroshima]
PS C:\Users\Administrator> New-ADOrganizationalUnit Development01 `
-Path "OU=Hiroshima,DC=srv,DC=world" `
-ProtectedFromAccidentalDeletion $True 

# verify
PS C:\Users\Administrator> Get-ADOrganizationalUnit -Filter * | Format-Table DistinguishedName 

DistinguishedName
-----------------
OU=Domain Controllers,DC=srv,DC=world
OU=Hiroshima,DC=srv,DC=world
OU=Development01,OU=Hiroshima,DC=srv,DC=world


# to delete OU,
# disable [ProtectedFromAccidentalDeletion $True] option first
# = protected option from accidental deletetion
PS C:\Users\Administrator> Set-ADOrganizationalUnit `
-Identity "OU=Development01,OU=Hiroshima,DC=srv,DC=world" `
-ProtectedFromAccidentalDeletion $false 

PS C:\Users\Administrator> Remove-ADOrganizationalUnit -Identity "OU=Development01,OU=Hiroshima,DC=srv,DC=world" 

Confirm
Are you sure you want to perform this action?
Performing the operation "Remove" on target "OU=Development01,OU=Hiroshima,DC=srv,DC=world".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
Active Directory : Add Organizational Unit (GUI)
 

On GUI configuration, set like follows.

[2] Run [Server Manager] and open [Tools] - [Active Directory Users and Conputers],
next, right-Click your domain name on the left tree and select [New] - [Organizational Unit].
[2] Set any name you like.
[3] A new Organizational Unit is just created.
[4] It's possible to configure hierarchical design in Organizational Units.
Delete Organizational Unit
[5] By default, the option [Protect container from accidental deletion] is enabled for Organizational Units,
so it's impossible to delete them. If you'd like to delete them, disable the option first like follows.
Select [View] - [Advanced Features].
[6] Right Click the Organizational Unit you'd like to delete and open [Properties].
[7] Move to [Object] tab and un-check a box [Protect container from accidental deletion], then you can delete this Organizational Unit.
Matched Content