I have setup a script to query AD for everything that is a Computer Object.
I am then taking that list and connecting to each workstation so that I can
change the Local Admin Password. The query is at about 1500 workstations.

Set objWMIService = GetObject("winmgmts:\\" & arrWorkstations(j) &
"\root\cimv2")

Since some machines are turned off, as well as some machine do not exist
anymore, any machine that I cannot connect to is written to a file to
chorten my next attempt.

Where I am having trouble is that I'm not sure how to to connect to the
workstation and bind to the local admin account so I can reset the password.

Thanks.
Bart

Re: Changing the Local Administrator Password by Bart

Bart
Thu Jan 26 10:56:11 CST 2006

I believe I have found my solution.
Set objUser = GetObject("WinNT://" & arrWorkstations(j) & "/Administrator" )
' which comes with an appropriate DOH.

However, I believe there is a SID that I can look for that will allow me to
find the Administrator account even if it has been changed. I'd be
interested in that but for now, I am just tracking the error number returned
in this scenario (-2147022676).

Bart

"Bart Perrier" <bart_perrier@hotmail.com> wrote in message
news:%23OQnikoIGHA.2912@tk2msftngp13.phx.gbl...
> I have setup a script to query AD for everything that is a Computer
Object.
> I am then taking that list and connecting to each workstation so that I
can
> change the Local Admin Password. The query is at about 1500 workstations.
>
> Set objWMIService = GetObject("winmgmts:\\" & arrWorkstations(j) &
> "\root\cimv2")
>
> Since some machines are turned off, as well as some machine do not exist
> anymore, any machine that I cannot connect to is written to a file to
> chorten my next attempt.
>
> Where I am having trouble is that I'm not sure how to to connect to the
> workstation and bind to the local admin account so I can reset the
password.
>
> Thanks.
> Bart
>
>