I am looking for a batch file that will add the user logging in to that machines local administrators group. I have wrote a script but does not appear to be fully functional. It will only run properly if you are domain admin. The script I am running is
net localgroup Administrators /ADD "domain\%username%"
Is this incorrect?