Created
May 25, 2021 03:15
-
-
Save TaylorJadin/717d43881ed654a3c415042fc5dc737a to your computer and use it in GitHub Desktop.
Create local users in bulk from a csv using powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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