Help for this page

Select Code to Download


  1. or download this
    @host = ($server,"root/cimv2",$user,$password);
    $localWMI = Win32::OLE->new('WbemScripting.SWbemLocator') or die "Cann
    +ot access WMI on local machine: ", Win32::OLE->LastError; 
    $WMI = $localWMI->ConnectServer(@host) or die "Cannot access WMI on re
    +mote machine: ", Win32::OLE->LastError;
    
  2. or download this
     
    if ($myDomain = Win32::OLE->GetObject("WinNT://$server/$pworduser")) {
        $result=$myDomain->ChangePassword($oldpassword, $newpassword);
    ...
    else {
        print "Couldn't connect  :-(\n";
    }