Skip Ribbon Commands
Skip to main content


I don't like creating user accounts in the default User OU...

Body, I added a Department header in the CSV and appended valid department names which are the same as the department OUs, then added some code in the foreach loop:

#Set the OU path for new accounts, otherwise they'll go to the default User OU
        $Dept = 'OU=' + $user.department
        $MoveOU = $Dept + ",OU=Departments,OU=Accounts,DC=usroboto,DC=com"

I also added "-Path $MoveOU" to New-ADUser cmdlet in the foreach block.

Today's date



Approval Status Pending


Created at 7/18/2017 1:44 PM by  
Last modified at 7/18/2017 1:44 PM by