You can use powershell in a batch file as follows:
powershell -command "& { ([adsi]'WinNT://./your-local-group,group').Add('WinNT://YOURDOMAIN/your-really-long-global-group-name,group'); }"
One of the tricks above is to use double quotes for the entire command when using single quotes in commands. This allows you to run the statement from cmd.exeor inside the .bat / .cmd file.
source
share