Wednesday, June 9, 2010

Batch file for loop in other way

echo ***** Are you sure you want to add these accounts? *******
echo *** If not, press CTRL-C to terminate this batch file ***
pause
FOR %%X IN (NT1 NT2 NT3 NT4 NT5) DO NET COMPUTER \\%%X /ADD
FOR %%X IN (NT6 NT7 NT8 NT9 NT10) DO NET COMPUTER \\%%X /ADD
cls
echo ******* Machine Accounts Added ********
pause

No comments: