Learn about Windows PowerShell
Summary: Use Windows PowerShell to create an organizational unit in Active Directory.
How can I use Windows PowerShell to create an OU in my Active Directory?
In Windows Server 2012 R2 or Windows Server 2008 R2, use the New-ADOrganizationalUnit cmdlet.
To create a new OU at the root of Active Directory called “Divisions”:
If it needs to exist in different path in Active Directory, specify the path by its distinguished name:
NEW-ADOrganizationalUnit “Divisions” –path “OU=Offices,DC=Contoso,DC=local”
Very Useful cmdlet
Yes. It's a far cry than trying to do it with Vbscript.
I love the fact that PowerShell offers a common and simple methodology regardless of whether I am working with Exchange in Office 365 or managing files on the local drive.
Any tips on using the dsacls to set and remove inherited permissions.
I want to remove the inheritance mark, but keep the security, but if I remove the inheritance by pwoershell the security is removed and not kept.
dsacls “\\$varDc\OU=$varOrg,$varBase” /G “CN=$varOrg Group,OU=Groups,OU=$varOrg,$varBase:RCLCRP” /I:P