Here is a very useful VBS function; I use it a lot in logon scripts.

The function will return True or False depending on if the current user running the script is a member of the AD group passed to the function.

To get the function working you will need to replace domain_name_here in the function with you active directory domain name

This particular script will not work with nested groups.

Example Usage:

The Function: