VBScript isMember function

Some functions to determine group membership.

You can find an excellent, tried and tested VBScript program to enumerate members of a group
over at hilltop labs - http://www.rlmueller.net/Programs/EnumGroup2.txt


List all members of group64

cscript //nologo EnumGroup2.vbs "group64"


There are several approaches for checking group membership in VBScript - consider if you need to check Local or Domain groups, and to include or not include nested permissions.

There are also some gotchas to consider - when enumerating the members of a group it is possible that nothing will be returned, one member is returned or multiple members returned. Test your code with all these possibilities.

Richard mueller has a number of IsMember scripts

Test group membership for a single user.

Test group membership (including nested groups) for a single user or computer.


IFMEMBER - Is the current user a member of a group.
Powershell equivalent: Get-adGroupMember -Recursive - Get the members of an AD group.

“If I had to live my life again, I'd make the same mistakes, only sooner” ~ Tallulah Bankhead.

Copyright © SS64.com 1999-2019
Some rights reserved