Can someone help me create a script that will allow me to run this command:
net localgroup administrators mydomain.local\user1 /addIt needs to be run as an administrator.ideally what im after is that when the "run now" is pressed, i get a form which asks for the domain name and username.thank you.
Yeah it's because I altered it a little to post it here but didn't change the procedure. Edit it and change the third line to:
net localgroup administrators #domain#\#username# /add
It's set to net localgroup administrators #domain#\#user# /add
Or you could change the second line so that the variable is just user
I have something very similar which should work for you.
i've attempted to run the script but i get this error:
Failed THEN in step 3 (Line 6)
Thanks, i got it worked :D
quite exciting stuff really.. first time i've dipped into using variables and now i've made a load of procedures :P