These might help (simple command line script tasks, which can be run from embedded scripts):
https://technet.microsoft.com/en-gb/library/bb680367.aspx
Net localgroup <group> <domain name>\<computer name>$ /ADD
And if you prefer PowerShell:
https://technet.microsoft.com/en-gb/library/ee617210.aspx
-BBC