Re: Is it possible to change the local administrator password for multiple machines in a domain using WSH or VB Script?
- From: "LCC" <shana@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 3 May 2005 10:33:14 +0100
Most helpful. I at least have a way forward now.
Thank you.
Shana
"Randy" <aggie07@xxxxxxxxxxxxx> wrote in message
news:Xngde.50742$hu5.31512@xxxxxxxxxxxxxxxxxxxxxxx
> LCC wrote:
> > How would one alter the local administrator password of multiple
> > workstations remotely using a WSH or Cscript. The users who log on, do
not
> > have admin privilages. Therefore the possiblity of using the "net use"
> > command in a batch file in the login script does not work either.
> >
> > I am a novice so please keep the explanation simple as possible.
> >
> > With Kind Regards,
> >
> > Shana
> >
> >
> You could use an ADSI script to change the password and then uses a WSH
> script that leverage the remote execution method shown below. The script
> reads a list of computer names from the c:\computer.txt file and
> executes the c:\pswrd.vbs script against each computer in the list from
> computer.txt. The pswrd.vbs file is created on the remote system and
> then executed. This is done in plan text, so its not the most secure
> approach.
>
> You can do a search on Google to find a ADSI script that will change the
> local administrator's password.
>
> ~Randy
>
> '---------8<------------------
> Dim fso, File, Controller, Remote, strComputer
>
> Set Controller = CreateObject(?WSHController?)
> Set fso = CreateObject(?Scripting.FileSystemObject?)
> Set File = fso.OpenTextFile(?c:\computers.txt?)
>
> Do Until File.AtEndOfStream <> ""
> strComputer = objFile.ReadLine
> Set Remote = Controller.CreateScript(?c:\pswrd.vbs?, strComputer)
> Remote.Execute
>
> Do While Remote.Status = 0
> WScript.Sleep 1000
> Loop
>
> WScript.Echo ?Finished script on ? & strComputer
> Loop
>
> File.Close
> WScript.Echo ?Finished all computers?
> WScript.DisconnectObject Remote
> WScript.Quit
> '---------8<------------------
.
- References:
- Prev by Date: Yes
- Next by Date: RE: Yes
- Previous by thread: Re: Is it possible to change the local administrator password for multiple machines in a domain using WSH or VB Script?
- Next by thread: Re: Registering new extension in WSH
- Index(es):
Relevant Pages
|