Hi All,
Can someone help me with these 2 question that I have?
1) How can I print the date of the Last password set? It is telling me that it
is a hash.
2) Can I specify a specific DomainName\UserID to the Win32::OLE object and
search for that user info instead just getting the current user logged on info
that run the program?
Thanks
Alain
use Win32::OLE;
use strict;
my $sysinfo = Win32::OLE->new('ADSystemInfo') || die ("Can't get sysinfo: "
.Win32::OLE->LastError()."\n");
my $userDN=$sysinfo->{UserName};
my $adsuser = Win32::OLE->GetObject("LDAP://$userDN") || die ("Can't find user:
".Win32::OLE->LastError()."\n");
print "CN: $adsuser->{cn}\n";
print "Username: $adsuser->{Samaccountname}\n";
print "Last set: $adsuser->{pwdLastSet}\n";
This is my output:
CN: Smith, James
Username: jsmith
Last set: Win32::OLE=HASH(0x19a3b04)
_______________________________________________
Perl-Win32-Admin mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs