I have been to create a script for user creation, before i get in to the fancy stuff of adding groups & moving to correct OU.
I am having trouble import from csv, as my output is, well not complete. Can someone help with debugging it.
I’m just not sure why this is doing it.
This is my CSV Layout;
This is my script;
$Users = Import-Csv -Delimiter “,” -Path “C:\User.csv”
foreach ($User in $Users)
$Firstname = $User.Firstname
$Lastname = $User.Lastname
$Location = $User.Location
$Role = $User.Role
$Manager = $User.Manager
#Configures Variabes for account creation
$sAMAccountName = $User.Firstname + “.” + $User.Lastname
$displayName = $User.Firstname + " " + $User.Lastname
#Common Name for account
$cn = $User.Firstname + " " + $User.Lastname
This is my output