Link to home
Start Free TrialLog in
Avatar of sara2000

asked on

Enable local admin account

We have about 300 Windows servers. The local administrator account is disabled. I would like to enable the to rest the password.
Is there any ps script which you can share with me to enable the administrator account?
Avatar of Hello There
Hello There

You should be able to use GPO for this.

Or you can try Local Administrator Password Solution (LAPS) by Microsoft:

Alternative 3rd party solution:
Netwrix Bulk Password Reset

I like the last one. It seems to be really simple to use.
Avatar of sara2000


I just want to enable the local admin , I have a third party solution to reset the password, unfortunately it will not enable the disabled account.
Then use GPO for this.

If you prefer enable local admin account with a command line, there is an option:
net user administrator /active:yes

Open in new window

what is the nature of the disabled account? why not create/add a new one and manage it.
Thank you all, my question is how to enable a local account using PS script for a few computers?
Something like
Get-ADComputer -Filter { (ObjectClass -eq "Computer")
then output the result in a txt file and enable the admin account one at a time.
GPO will do the job.

Create a new GPO and go to: Computer configuration -> Policies -> Windows Settings -> Security Settings -> Security Options. On Right Pane click on Accounts: Administrator account status and change the settings to Enabled. Apply the policy to all desired computers.

If you want a script, deploy the startup script with GPO that contains:
net user administrator /active:yes

Open in new window

Avatar of Bastiaan
Flag of Netherlands image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial