/build/static/layout/Breadcrumb_cap_w.png
04/04/2019 116 views

I'm using Specops os/deploy and during the deploy I wan't to create a local account with admin rights.

Many thanks in advance

Kind regards

Filip

 

0 Comments   [ + ] Show comments

Comments


All Answers

0

Save the following as a .bat file.

net user username Password /add /active:yes
net localgroup administrators username /add

And run during deployment.


Edit parts in Bold.

Answered 04/04/2019 by: Ziggi
Orange Senior Belt

0

Powershell option (v5.1+)


$AccountNameParams = @{
Name = "AccountName"
Password = ('l337p@ssw0rd' | ConvertTo-SecureString -AsPlainText -Force)
FullName = "Account Name"
AccountNeverExpires = $true
PasswordNeverExpires = $true
Confirm = $false
}

New-LocalUser @AccountNameParams
Answered 04/04/2019 by: isudothings
Purple Belt