for /f "tokens=1,2*" %a in ('NET LOCALGROUP ^|find /I /V "the"') do echo %a
the above will set the user groups into %a ,
for /f "tokens=1,2*" %a in ('NET LOCALGROUP ^|find /I /V "the"') do NET LOCALGROUP '%a'
using this in a batch file remember to add an additional percentile symbol , example
for /f "tokens=1,2*" %%a in ('NET LOCALGROUP ^|find /I /V "the"') do NET LOCALGROUP '%%a'