I am looking for help creating a script to create an OU called "Secured Laptops" in several locations.
My AD structure has OU's like this:Region > City > PCs
Under PCs is Desktops and Laptops. I'd like to script creating the "Secured Laptops" under all the PCs OUs. This is what I started. It does not fail, but the OUs are not created.:
$ChildOU = "Secured Laptops"
# Create default child OUs
foreach ( $ChildOU in $ChildOUs )
{
New-ADOrganizationalUnit -Name $ChildOU -Path (Get-ADOrganizationalUnit -LDAPFilter '(Name=PCS)') -ProtectedFromAccidentalDeletion $True
}