PowerShell: How to Create an AD User in a Specific OU

You can create a Windows Active Directory (AD) user in a specific OU by using the -path parameter in 'New-ADuser' PowerShell command. The following example will create a user in the 'students' OU of the 'pel.com' Active Directory domain.

New-ADUser -Name “Karim Buzdar" -GivenName Karim -Surname Buzdar -SamAccountName kbuzdar -UserPrincipalName kbuzdar@pel.com -path "OU=students, DC=pel, DC=com