
steggles
New User
Jan 30, 2008, 8:49 PM
Post #5 of 6
(4676 views)
|
|
Re: [KevinR] Finding the Group Membership of a User
[In reply to]
|
Can't Post
|
|
This is basically what i want to achieve. I hope I am not too clueless. use strict; use warnings; use Win32::AD::User; use Win32::OLE; my $user = Win32::AD::User::new("LDAP://cn=username,ou=Computer Department,ou=Administration,ou=Company,ou=Corporate,dc=domain,dc=com", "username") or die "error $!"; @groups = $user->get_groups(); foreach (@groups) { print ("Group: $_ \n"); } Although I would read into an array and then do things to the profile per group membership, but printing out the group membership i good enough for testing.
|