If you take a look at 'net localgroup groupname' structure you will see why I skip 6 tokens and that it produces an error at the end, because the last token is the confirmation that the command was successfully executed. As far as I know you need to write a script to get rid of that.