New-LocalUser and Add-LocalGroupMember are not recognized as the name of a cmdlet

While running the PowerShell script to add an account to local administrators group on remote Windows 2012 computer, I am getting the error

New-LocalUser and Add-LocalGroupMember are not recognized as the name of a cmdlet

How can I resolve this error?

1 Answer

I'm finding that the x86 version of PowerShell is unable to see the LocalAccounts module.

The solution is to run the x64 version of PowerShell (which is the one marked with neither x86 nor x64).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like