Hello,
I am trying to retrieve the accountexpirationdate field for a user account
using Win32::OLE and ldap using the following code :-
use Win32::OLE;
use strict;
my($user)="cn=username"; # fill in as appropriate
my($container)="ou=users container";
my($domain)="dc=my,dc=domain";
my($aduser)=Win32::OLE-> GetObject("LDAP://$user,$container,$domain");
die "Can't connect to ad for $user, ", Win32::OLE-> LastError, "\n" if
(Win32::OLE-> LastError() != 0);
print "accountexpires = ", $aduser-> Get("accountExpires"), "\n";
This returns
accountexpires = Win32::OLE=HASH(0x1a752a8)
There are no keys in the Win32::OLE Hash and therefore no data that I can
read. To make matters worse, querying the property 'accountExpirationDate'
returns nothing.
Has anyone managed to actually read this property out and therefore usable
in a perl script? If so, can they provide an example?
--- Computer Services
Phone us at (250) 391-2659 or 1-866-808-5429 (Toll Free in North America only)
For great tips and information, please visit our website at http://ComputerServices.royalroads.ca
If you have feedback or comments, we would like to hear from you. Please e-mail [EMAIL PROTECTED]
[EMAIL PROTECTED], 250 391 2533
Royal Roads University, Victoria, B.C. Canada
_______________________________________________ Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs