From a command line (on the AD server) you can use this to get the members of a group:
1: dsquery group -name "Group Account Name" | dsget group -members
Additionally a command line exe to get the groups for the logged in member too, something like this:
1: My.User.InitializeWithWindowsUser()2:3: Dim identity As System.Security.Principal.WindowsIdentity = TryCast(My.User.CurrentPrincipal.Identity, System.Security.Principal.WindowsIdentity)4:5: Debug.WriteLine(identity.Name)6:7: For Each group As System.Security.Principal.SecurityIdentifier In identity.Groups()8: Debug.WriteLine(group.Translate(GetType(System.Security.Principal.NTAccount)), "group")9: Next10:
Leave a Reply