Listing 5: ChangeLocalGroupNames.bat
Set InputList=D:\grouplist.txt
Set CusrmgrLoc=D:\cusrmgr.exe
Set Log=D:\grouplog.txt
:: BEGIN COMMENT
:: For renaming a large number or groups, use an input file with commas
:: separating the old and the new group names.
:: END COMMENT
For /f "tokens=1,2 delims=," %%i in (%InputList%) Do %CusrmgrLoc%
-m \\work1 -rlg "%%i" "%%j" |Find "Renaming">>"%Log%"
Echo Run complete
Goto :EOF