id="info"

Question

Locked

change the local administrator password on the network

By hashem_hai ·
hi
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.

4 total posts (Page 1 of 1)  
| 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':

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_user.mspx

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
Wscript.Echo objItem.cn
Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")

objUser.SetPassword "typenewpasswordhere"
objUser.SetInfo
Next

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!

Back to Software Forum
4 total posts (Page 1 of 1)  

Software Forums