The following chunk of VBScript will use ADSI to modify the administrator
account of the specified machine. I'm not sure if it'll work remotely. The
account that executes it must have administrator privileges, obviously.

Since it uses ADSI, this will only work on Win2k/XP machines or NT machines
with the Active Directory Client Extensions and SP 6a installed, which may
mean this isn't workable for you.

'Script to change administrator password. Set MACHINENAME to your machine
name.
Dim usrObj
Set usrObj=GetObject("WinNT://MACHINENAME/Administrator")
usrObj.SetPassword("newpass")
Set usrObj=Nothing

Note: I'm not responsible if you use this and it screws anything up. If you
want to use this, I recommend looking up how to use ADSI at
msdn.microsoft.com for more information.

Regards,

Corey

> -----Original Message-----
> From: Polk Robert [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 04, 2002 5:50 AM
> To: [EMAIL PROTECTED]
> Subject: Program to change NT/Windows 2000 Administrator password
> 
> 
> Hello All,
> 
> Does anyone know of the existance of a program
> (preferably freeware) that I can used to create a
> script that changes the administrator password on
> NT/Windows 2000 servers. I planned on running this
> script on a workstation and changing the administrator
> password on machines in the current domain as well as
> on machines in other domains.  Any assistance will be
> greatly appreciated.
> 
> Thanks.
> 
> Bob
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - sign up for Fantasy Baseball
> http://sports.yahoo.com
> 

#########################################################
The information contained in this e-mail and subsequent attachments may be privileged, 
confidential and protected from disclosure.  This transmission is intended for the 
sole 
use of the individual and entity to whom it is addressed.  If you are not the intended 
recipient, any dissemination, distribution or copying is strictly prohibited.  If you 
think that you have received this message in error, please e-mail the sender at the 
above 
e-mail address.
#########################################################

Reply via email to