Avatar of andrew_2706
andrew_2706

asked on 

Import Users into AD with Active Directory Module for Windows Powershell

Importing users into AD

In Active Directory Module for Windows Powershell I'm using Import-Csv .\test.csv | New-ADUser -Enabled $True -AccountPassword (ConvertTo-SecureString M5aeq -AsPlainText -force) which works to a point, I'm not getting the import of the telephonenumber and it's not placing in the Organizational Unit specified in the csv file.

givenName,name,telephonenumber,ou
test company,test company,01702 123456,OU=SarkContacts,DC=domain,DC=net

I would of preferred to import them as Contacts but I don't thing that can be done with the above method.

Regards
Mark
PowershellActive Directory

Avatar of undefined
Last Comment
andrew_2706

8/22/2022 - Mon