Answer the question
In order to leave comments, you need to log in
How to export 20 users to a file, then import to a new server?
Windows Server 2016 Standard. Old and new. Not AD.
If anyone has two such ready-made scripts, it would be great.
Answer the question
In order to leave comments, you need to log in
something like this
get-localuser | export-csv -delimiter ';' -encoding utf8 -notypeinformation -path d:\путь_к_файлу.csv
import-csv -delimiter ';' -encoding utf8 -path d:\путь_к_файлу.csv |
foreach-object {
$pass = New-Object System.Management.Automation.PSCredential 'a', ($_.password | ConvertTo-SecureString - AsPlainText -Force)
new-localuser -Name $_.Name -Password $pass.password ..... # тут другие нужные параметры
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question