Well this means that the permissions of the account under which the script is ran have to be local admin. Setting this script as a startup script would solve that problem. However keep in mind that you can not do "InGroup" statements when placed as Startup as it is not the user thats running the script but rather the System account.