getting user attributes in perl
by Rich Gomes other posts by this author
Mar 4 2009 2:01PM messages near this date
view in the new Beta List Site
Re: PERL Script Debugging
|
Paul J Walters/Rochester/IBM is out of the office.
I have a script which returns all users in my domain. It works great but I want a way to ret
rieve additional attributes like 'manager' or 'mail'.
Is there a way to do this using Win32::OLE?
Script follows:
use Win32::OLE 'in';
$ADsPath = "WinNT://mydomain/adomaincontroller";
$c = Win32::OLE-> GetObject($ADsPath) or warn "Unable to get $ADsPath\n";
foreach $adsobj (in$c) {
print $adsobj-> {Name},"\n" if ($adsobj->{Class} eq "User")
}
Thanks in advance
Rich
|