Scripting Question

Powershell Local Admin

08/07/2020 590 views

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


Community Chosen Answer


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\

Answered 08/08/2020 by: flip1001
Black Belt

All Answers


Powershell, Schmowershell... Keep it simple:

net user [new_user_name] [password_for_new_user_name] /add
net localgroup Administrators [new_user_name] /add
Answered 08/13/2020 by: VBScab
Red Belt

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