I hate to say it, but the scripting support in NT is a joke compared to Novell so get ready for a fun job. I am going through the same deal.
Here are your options:
1. Use ifmember.exe from NT resource kit. This sounds great, but guess what?It only works with NT CLIENTS !?!?. Try to find that piece of information.
2. Use KixTart. That is what the other reply is talking about when they mention the INGROUP option. This is also in the NT resource kit, but there is a newer version out there, 3.6 I believe. This is the option I am going with.
3. Use WSH. The only drawbacks for this is that it has to be installed on all client workstations AND you have to download a special LDAP aware script file to "include" in your script.
If you are really serious about this, I will send you all the information I have. You will find that most people don't know crap about this, and I know very little but I feel like I know enough to give advice on it.