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