Managing Organizational Units
Organizational Units (OUs) are used for grouping various Active Directory objects so that they can be managed easily. In this section, we will look at some of the Active Directory operations related to OUs using PowerShell.
The majority of operations on OUs can be performed using four cmdlets in Active Directory, they are Get-ADOrganizationalUnit
, New-ADOrganizationalUnit
, Set-ADOrganizationalUnit
, and Remove-ADOrganizationalUnit
. As their names indicate, they are available to perform designated operations. Now, let's look at the usage of these cmdlets by performing some sample operations.
Searching for OUs
In Chapter 4, Configuring Group Policies, we used the Get-ADOrganizationalUnit
cmdlet to get the group policies linked on a given OU. So, from that example, and by looking at the name of the cmdlet, it is clear that this cmdlet can be used to retrieve details of OUs in Active Directory. We can retrieve all kinds of details about an OU using this cmdlet except...