Hi Guys, I wonder if you can help out.
I'm trying to add a network admin security group to my local Admins group on some computers I'm prepping. Currently this means logging in with the local admin, opening computer management, adding the group, then putting in my network admin credentials.
What I'm trying to do is script it. Here is the script I have so far, which obviously doesn't work.
net localgroup Administrators /ADD domain\SG_AD_Admins
net localgroup "Power Users" /ADD "domain\domain users"
It keeps throwing me an Access is denied error when I run it as either local admin or network admin, which makes sense since I need the local account to get into computer management but then network admin to actually add the security group.
I was also messing around with the runas command, but so far I'm pretty stumped. Any help would be appreciated!
I'm trying to add a network admin security group to my local Admins group on some computers I'm prepping. Currently this means logging in with the local admin, opening computer management, adding the group, then putting in my network admin credentials.
What I'm trying to do is script it. Here is the script I have so far, which obviously doesn't work.
net localgroup Administrators /ADD domain\SG_AD_Admins
net localgroup "Power Users" /ADD "domain\domain users"
It keeps throwing me an Access is denied error when I run it as either local admin or network admin, which makes sense since I need the local account to get into computer management but then network admin to actually add the security group.
I was also messing around with the runas command, but so far I'm pretty stumped. Any help would be appreciated!