> Giuoco, Aaron wrote:

> Along these same lines, does anyone know a way using either perl or 
> vbscript to change the administrator password on a group of computers 
> managed in Active Directory?
> 
> I have the book you referenced, but there wasn't any mention 
> of this in 
> there.


You could try this - uses ADSI to connect to a group of servers and
change the local admin pass.

Paul

===

use Win32::OLE;
 
my @servers = (qw(
        server1.domain.net
        server2.domain.net
));

my $password = "SetPasswordHere";
 
foreach my $server (@servers) {
        print "Resetting local admin on $server\n";
        my $ladmin =
Win32::OLE->GetObject("WinNT://$server/administrator");
        unless ($ladmin) {
                print "ERROR: Cannot connect to ADSI provider on $server
- skipping\n";
                next;
        }
        $ladmin->SetPassword($password);
        print "Pass reset\n";
}

*****************************************************************
Gloucester Research Limited believes the information 
provided herein is reliable. While every care has been 
taken to ensure accuracy, the information is furnished 
to the recipients with no warranty as to the completeness 
and accuracy of its contents and on condition that any 
errors or omissions shall not be made the basis for any 
claim, demand or cause for action.
*****************************************************************


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to