/build/static/layout/Breadcrumb_cap_w.png

I wan't to know how I can create a local account with admin rights on a clientpc.

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

Answers (2)

Posted by: Ziggi 5 years ago
Blue Belt
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.

Posted by: isudothings 5 years ago
Senior Purple 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
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ