I'm hoping someone can help me with the following New-AddUser script, which works in my test environment, but does not work in my production environment. I get the following output, after running the script: I also included the script that produces the output
cmdlet New-ADUser at command pipeline position 1
Supply values for the following parameters:
Name:
PS C:\Windows\system32> import-csv 'x:\bsed.csv' | ` ForEach-Object { `
new-aduser -GivenName $_.'First name' `
-Surname $_.'Last name' `
-UserPrincipalName ($_.'Principle Name' + "@ds.detroitmi.gov") `
-SamAccountName $_.'SAM Account' `
-DisplayName $_.'Display name' `
-EmailAddress $_.'E-mail' `
-OfficePhone $_.'Phone' `
-Department $_.'Depart' `
-Company "City of Detroit" `
-streetAddress $_.'Address' `
-City "Detroit" `
-State "Michigan" `
-Office $_.'Office Name' `
-Description $_.'Job title' }
parameters:
Name: