I’m trying to import a csv file to create OU’s in active directory using powershell. Now I have figured out to set it up to get the file. What I haven’t been able to figure out is the scripting to get the names and create the actual UO’s. I’ve searched the web and everyone has a different setup. I’ve attached a copy of my csv file of what I’m try to setup as Ou’s. This is what i have started but after that I’m lost. Any help would be appreciated.
Import-Csv "OUspreadsheet.csv" | ForEach-Object {
-ParentContainer $_."GroupLocation"
-SamAccountName $_."Logon Username"
-FirstName $_."First Name"
-LastName $_."Last Name"
-Description $_."Member"