change the local administrator password on the network

By hashem_hai ·
we have about 2000 client and we are going to change the password of local administrator,how can we do that with script or group policy or ...?
best regards.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

GPO and script

by Toivo Talikka In reply to change the local administ ...

You can push the script to the workstations in a GPO. The following Microsoft article explains the syntax of the command 'net user':

Collapse -

The scripting guys have a few options

by babydrum2003 In reply to change the local administ ...

This one works for me. It does it based on OU so if your computers are in different OU's then you'll need to modify it.

Set objOU = GetObject("LDAP://OU=Computers, DC=companyname, DC=com")
objOU.Filter = Array("Computer")
Set objNetwork = CreateObject("WScript.Network")

On Error Resume Next

For Each objItem in objOU

strComputer = objItem.CN
Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")

objUser.SetPassword "typenewpasswordhere"

Collapse -

Question for the Scripting Guy

by bryan.dylan In reply to The scripting guys have a ...

I made the necessary changes to the script for the LDAP setting and when I run the script nothing happens. Correct me if I am wrong, but this is a vbs script isn't it? Thanks for your help!

Related Discussions

Related Forums