Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create local users in bulk from a csv using powershell
$importCSVpath="C:\users\paperspace\desktop\userlist.csv"
ForEach ($user in (Import-CSV $importCSVpath)){
$password = ConvertTo-SecureString $user.password -AsPlainText -Force
New-LocalUser -Name $user.username -Password $password -FullName $user.fullname
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment