I'm writing a Powershell script to populate all the company users to a Active Directory from a CSV file.
The script uses the Powershell command
New-ADUser and it should know, for every user, where is the path to add them, for example:
The problem is: this Active Directory doesn't have any users yet, so there's no Organizational Units created, and whenever I run the script, if the path doesn't exists, the user is not created.
I've looked up for a command to create Organizational Units, like
dsadd, however they do not support recursive creations, like
does not exist yet.
Is there any way of doing that using New-ADOrganizationalUnit?