change local admin psw in AD

G

Guest

We has someone leaving our Tech group so i need to change the admin name and
pswd.

I need to change the local admin psw on all our machines in AD. I'm an admin
in our OU and have an admin account on all the machines. I also have all the
current computer names.

I need to be able to change the admin pswd and admin name, and be able to
log successes and failures.
I belive this will change the local admin pswd but how do i change the name
and log the results.

On Error Resume Next
Set DomObj = GetObject("WinNT://Domain/Computer/Administrator,User")
DomObj.SetPassword "pswd"


any help would be appreciated
thanks
 
G

Guest

To rename the “Local Adminstrator†ID on the computers create a new GPO.
Under “computer configuration†select Windows Settings, Security Settings,
Local Policies, Security Options: select “Accounts: Rename Administrator
Accounts†Enter new account name and select OK

Link the GPO to the OU where you have the computer accounts that you want
the local administrator account name changed.

Once that is done..to change the local administrator password:
you can type the following command: net user <user_name> <new_password>.
When you do so, the password changes without prompting you again. This
command also enables you to change passwords in a batch file.
 
G

Guest

thanks very much

To rename the “Local Adminstrator†ID on the computers create a new GPO.
Under “computer configuration†select Windows Settings, Security Settings,
Local Policies, Security Options: select “Accounts: Rename Administrator
Accounts†Enter new account name and select OK

Link the GPO to the OU where you have the computer accounts that you want
the local administrator account name changed.

Once that is done..to change the local administrator password:
you can type the following command: net user <user_name> <new_password>.
When you do so, the password changes without prompting you again. This
command also enables you to change passwords in a batch file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top