Is there a way to create a script to run on my K1000 to remove administrative rights for the domain user logged into a PC
When we rolled out our last group of PC's, we made all of the users Local Administrators of their own PC. We would like to reverse this policy and remove the users as local administrators. Is there a way to script this to run through my K1000 so that we do not have to physically go to each machine and manually remove the users?
Thank You,
Andrew
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
chucksteel
10 years ago
Posted by:
SMal.tmcc
10 years ago
If you have an uinque user on each machine and do not have too many off them you can use the command chuck mentioned in a batch file with all those users. The lines that do not apply just error and move to the next line. You would want to run this invisible because the errors will go by in the command window if you do not hide it. This way you can create one script for the group of machines, else you will need to create a script for each user/machine.
http://www.itninja.com/blog/view/how-to-hide-running-a-batch-file-from-a-kscript-with-version-5-5
Sample batch file
net localgroup administrators domain\user2 /delete
net localgroup administrators domain\user3 /delete
net localgroup administrators domain\user4 /delete
net localgroup administrators domain\user5 /delete
net localgroup administrators domain\user6 /delete
net localgroup administrators domain\user7 /delete
net localgroup administrators domain\user8 /delete
net localgroup administrators domain\user9 /delete
http://www.itninja.com/blog/view/how-to-hide-running-a-batch-file-from-a-kscript-with-version-5-5
Sample batch file
net localgroup administrators domain\group /delete
net localgroup administrators domain\user1 /deletenet localgroup administrators domain\user2 /delete
net localgroup administrators domain\user3 /delete
net localgroup administrators domain\user4 /delete
net localgroup administrators domain\user5 /delete
net localgroup administrators domain\user6 /delete
net localgroup administrators domain\user7 /delete
net localgroup administrators domain\user8 /delete
net localgroup administrators domain\user9 /delete