Powershell Local Admin

New to KACE. I am trying to run ps through scripting to create a local admin account. I am able to get the script to execute but it does not seem to work because it is not recognizing the cmdlet. Any help would be appreciated.

Running as SYSTEM
New-LocalUser : The term 'New-LocalUser' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: flip1001 1 year ago
Black Belt

You have to use the 64-bit Powershell to use that cmdlet. Set the folder path to Powershell as C:\Windows\Sysnative\WindowsPowerShell\v1.0\

Posted by: anonymous_9363 1 year ago
Red Belt

Powershell, Schmowershell... Keep it simple:

net user [new_user_name] [password_for_new_user_name] /add
net localgroup Administrators [new_user_name] /add
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