Changing local admin password (Full Version)

All Forums >> [Scripting Technologies] >> VB Script



Message


udagnese -> Changing local admin password (6/10/2008 2:10:49 PM)

Can someone tell me how to change the local admin password using a script?[:o]




rtruss -> RE: Changing local admin password (6/10/2008 2:35:08 PM)

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




kdsrazor -> RE: Changing local admin password (6/12/2008 3:42:13 PM)

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




dnemec -> RE: Changing local admin password (6/12/2008 3:48:56 PM)

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




billhni -> RE: Changing local admin password (7/6/2008 9:01:55 AM)

This Script worked quite well for me.
http://www.myitforum.com/articles/8/view.asp?id=8423

-Bill




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.203125