myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Changing local admin password

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> VB Script >> Changing local admin password Page: [1]
Login
Message << Older Topic   Newer Topic >>
Changing local admin password - 6/10/2008 2:10:49 PM   
udagnese

 

Posts: 1
Score: 0
Joined: 6/10/2008
Status: offline
Can someone tell me how to change the local admin password using a script?
Post #: 1
RE: Changing local admin password - 6/10/2008 2:35:08 PM   
rtruss


Posts: 245
Score: 11
Joined: 11/4/2004
Status: offline
here is the core of a vbscript to change the password, you will need to insert the appropriate items to make it work (like Set wshShell = CreateObject("Wscript.Shell")) but this should help you get started.

  Set objUser = GetObject("WinNT://" & sComputerName & "/Administrator,user")
  objUser.AccountDisabled = False
  objUser.SetPassword sNewPswd
  objUser.SetInfo

_____________________________

Roger Truss
Assistant Windows Administrator
SMS Admin
Trend Micro Admin
ImageUltra Admin

Please rate my post ;)

(in reply to udagnese)
Post #: 2
RE: Changing local admin password - 6/12/2008 3:42:13 PM   
kdsrazor


Posts: 235
Score: 10
Joined: 1/6/2006
Status: offline
Hello,

If you want an easy scriptless interface you can use DSRAZOR for Windows to do this.
Simply select the computers you want to update, enter the new password (twice - to confirm), and press OK.
DSRAZOR will contact the selected machines and update the local administrator password.  It also handles logging to let you know the password changes were successful.

It is an easy-to-use scriptless solution, but it is not free. It might save you a lot of time.  If you would like a one-on-one web presentation with an Engineer we would be happy to schedule it.
http://www.visualclick.com/?source=FORitforum

_____________________________

Ken Aldrich
Senior Support Engineer
Visual Click Software
512-231-9990 x 2
supportw@visualclick.com

(in reply to rtruss)
Post #: 3
RE: Changing local admin password - 6/12/2008 3:48:56 PM   
dnemec

 

Posts: 35
Score: 0
Joined: 7/19/2001
From: Beaverton, Oregon
Status: offline
Here's what we use:

@echo off
rem ***************************
rem * CHANGE THE NEXT LINE!   *
net user Administrator <your_new_password_here>
rem ***************************
if errorlevel 0 goto End

:End

rem * Clear errorlevel so SMS doesn't complain
set errorlevel=0

Be sure in the Program properties that you have a drive letter mapped.  As a cmd/bat file, this won't run correctly from a UNC path.

Good luck!
Dale

(in reply to kdsrazor)
Post #: 4
RE: Changing local admin password - 7/6/2008 9:01:55 AM   
billhni

 

Posts: 6
Score: 0
Joined: 12/15/2007
Status: offline
This Script worked quite well for me.
http://www.myitforum.com/articles/8/view.asp?id=8423

-Bill

(in reply to dnemec)
Post #: 5
Page:   [1]
All Forums >> [Scripting Technologies] >> VB Script >> Changing local admin 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



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.234