Win 7 Local account removal

Dear Sirs,

Please help me with the below issue.

There are several users who have created additional local user accounts on their computers. Nearly I have 200 machines like that.

Can we write a script to remove local account in all those machines remotely because the machines are located in different buildings.

My requirement is to remove all the additional local user accounts. The default admin and guest account should remain.

I am not good at scripting.. so experts suggestion is always helps. Please help me.

Thanks,
Venkat
LVL 3
venkatspbSenior Software EngineerAsked:
Who is Participating?
 
Sushil SonawaneCommented:
Please below link it might help you to delete local account using script.

(http://www.edugeek.net/forums/windows/79897-script-delete-all-local-user-accounts.html)


OR

Instead of delete the local user accounts from each workstation that has them. A possible alternative is to use Group Policy to manipulate the Log On Locally user right to prevent anyone except domain users from logging on to desktop computers targeted by such policy.

The Log On Locally user right is found under Computer Configuration \ Windows Settings \ Security Settings \ Local Policies \ User Rights Assignment

Refer below link to find in details.

(http://www.windowsnetworking.com/kbase/WindowsTips/Windows2003/AdminTips/Security/Howtoremoveunwantedlocaluseraccounts.html)
0
 
samithsukumarCommented:
all this 200 computers connected on a Active directory Environment .?
0
 
venkatspbSenior Software EngineerAuthor Commented:
Yes all are in same active directory domain.. People who have admin rights on the machines have created many local user accounts and added them in admins which is creating lot of problem.

Please help.

Thanks,
Venkat
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
Sushil SonawaneCommented:
Then you can apply second option also using group policy.
0
 
venkatspbSenior Software EngineerAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for venkatspb's comment #a38348938
Assisted answer: 500 points for sushil84's comment #a38348779

for the following reason:

Thanks
0
 
venkatspbSenior Software EngineerAuthor Commented:
ok
0
 
venkatspbSenior Software EngineerAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.