Batch files using IfMember

This week, I wanted to remind you of a useful batch file utility called

IfMember (ifmember.exe) which can be found in the Windows 2000 Resource

Kit or on Microsoft's website at:

IfMember is a great utility for checking a user's membership while

processing a batch file. For example, let's assume that you have a

batch file in which you want to run one subset of commands if a user is

a member of a special migration group called MigrationUsers. If they are

not a member of the group, and you do not want to execute the migration

commands, you would rather exit the batch file. By using IfMember you

will be able to accomplish this using the following code snippet:

----- Begin Code Snippet ----

@echo off


ifmember "MigrationUsers"

if not errorlevel 1 goto NoMigration


rem Put your code to do migration here

ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon