All I want to do is print out the groups a user belongs to. I searched the list for 'group' but came up with nothing.

Here is my code:

#! C:\perl\bin\perl

use strict;
use warnings;
# script modules usage
use Win32::OLE;                # base functionality
# attach to user and
my $oUser = Win32::OLE->GetObject("LDAP://cn=username,DC=test,DC=ca";);
my (@aGroups, $sGroup);
@aGroups = $oUser->GetEx('memberOf');
foreach $sGroup (@aGroups) {
   print "Group is: $sGroup\n";
}

I have also tried:
@aGroups = $oUser->Groups to no avail.

I definitely is friday afternoon here, I can't get anything done.  Any help?

martin

--
*****************************************************************

Martin Douglas (martin at you double-you oh dot see eh)
ITS Network Operations
Information Technology Services
Natural Sciences Centre, Room 209
University of Western Ontario
(519) 661-2111 x81187

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to