Skip to content

Instantly share code, notes, and snippets.

@TaylorJadin
Created May 25, 2021 03:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save TaylorJadin/717d43881ed654a3c415042fc5dc737a to your computer and use it in GitHub Desktop.
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