All,
 
I found the following in the archives and modified it for my needs. It works just 
fine. 
 
 use Win32::OLE;
 my $Domain = Win32::OLE->GetObject("WinNT://mydomain");
 my $User = $Domain->Create("computer", "myPC");
 $User->SetInfo;
 
        #The following prints the Win32::OLE->LastError value to show success/failure 
of the SetInfo method.
        if (Win32::OLE->LastError) {print "Error=" . Win32::OLE->LastError;}
 
 
-Henry

        -----Original Message----- 
        From: henry isham 
        Sent: Mon 1/20/2003 1:59 PM 
        To: [EMAIL PROTECTED]; 
[EMAIL PROTECTED] 
        Cc: 
        Subject: Active Directory
        
        
        Hi All,
        
        I'm trying to add a machine account to an AD domain, while logged in locally 
to that machine. I'm trying to do this during the machine build process. Is there a 
way to do this in Perl? I looked in Netadmin and AdminMisc, and neither had what I was 
looking for. I also tried an LDAP add, according to the docs, and it just didn't work. 
No errors. If anyone knows of a way to do this in Perl, or if I missed something in 
the Perl docs, please feel free to let me know. Thanks.
        
        
        -Henry
        

z¹VŠ}öÙ¢žf¢–)à–+-=êåZ)÷ØfŠyb²Û®ð¶+ÞJÖ­yÊ&N‹§²æìr¸›zm§ÿåŠËlz»Àrدy+Zµç(›ùšŠYšŸù²²æì


Reply via email to