I am trying to come up with a script to pull from a .csv, create new users, set their password to not expire and user cannot change and add them to a specific security group. Here is what I have so far:
import-csv c:\powershell\newusers.csv | new-aduser -AccountPassword (ConvertTo-SecureString Pizza123 -AsPlainText -force) -enabled $true
Whenever I add the password parameters, the script will work but it won’t actually set those options when I look at the accounts in AD. Also, any help with adding them to a specific security group upon creation would be helpful.