Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Change local Computer account password.

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,27796
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Change local Computer account password.
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Change local Computer account password. - 11/7/2005 2:24:59 AM   
  kmarty009

 

Posts: 64
Score: 0
Joined: 5/21/2004
From: USA
Status: offline
I am having a hard time finding any info in my books how to change the administrator account password on the local machines.  What I am trying to do is change the current password on 200 servers.  I dumped a list from AD of all my Win2K3 and Win2K servers.  How can I go about changing the local administrator password on all of these boxes?  Thanks for the help to anyone with where to start.

Kirk M

_____________________________

KirkM.
 
 
Post #: 1
 
 RE: Change local Computer account password. - 11/7/2005 2:33:35 AM   
  Zifter


Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
Check this column of the Microsoft's scripting guy's.

HTH

(in reply to kmarty009)
 
 
Post #: 2
 
 RE: Change local Computer account password. - 11/7/2005 2:40:54 AM   
  tnoonan

 

Posts: 364
Score: 0
Joined: 12/14/2004
From:
Status: offline
http://www.spoogenet.com/index.php?module=article&view=13&5cbaa9d36385e275f0a415eb9b827618=09d8abfa7817a9ac7e6942d29c0a3c7a

_____________________________

If you can conceive it you can achieve it
___________________________________

www.spoogenet.com

(in reply to Zifter)
 
 
Post #: 3
 
 RE: Change local Computer account password. - 11/7/2005 3:32:51 AM   
  kmarty009

 

Posts: 64
Score: 0
Joined: 5/21/2004
From: USA
Status: offline
Okay so thanks I did get my idea that I needed.  I did try this however I get an error on either script here are my scripts.  What am I missing?

setpwd.vbs
 Set fso = CreateObject("Scripting.FileSystemObject")

Set inFile = fso.OpenTextFile("C:\scripts\test\server.txt", 1)
Do Until inFile.AtEndOfStream
temp = inFile.ReadLine


Set objUser = GetObject("WinNT://" & temp & "/starrb")
objUser.SetPassword("wwe7vb!W")

Loop
WScript.Quit

Here is the error "C:\scripts\test\setpwd.vbs(8, 1) (null): 0x80005000"

Script 2
Setpwd2.vbs

Set objOU = GetObject("LDAP://OU=servers, ,OU=mich, OU=test, DC=GTFC, DC=com")
objOU.Filter = Array("Computer")

For Each objItem in objOU
    strComputer = objItem.CN
    Set objUser = GetObject("WinNT://" & strComputer & "/starrb")
    objUser.SetPassword("wwe7vb!W")
Next

Here is this error "C:\scripts\test\setpwd2.vbs(6, 5) (null): The network path was not found."

_____________________________

KirkM.

(in reply to tnoonan)
 
 
Post #: 4
 
 RE: Change local Computer account password. - 11/7/2005 5:24:56 AM   
  kmarty009

 

Posts: 64
Score: 0
Joined: 5/21/2004
From: USA
Status: offline
Actually I fixed it here is the code.  Just eliminate the space in Set objUser = GetObject("WinNT://"& strComputer &"/starrb").  After that the script fired right off.

_____________________________

KirkM.

(in reply to kmarty009)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Change local Computer account password. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts