Remove local admins

Comments

5 comments

  • Christian Bacher

    You have the solution directly in front of you.

    enter image description here

    Put in all unwanted local admin names in a cmd step and run this deployment against all workstations

    PS: don't be confused, your spelling "administrators" is right for your script, my spelling "administratoren" it's the german version.

    0
    Comment actions Permalink
  • Chris James

    Is there a way to remove computer accounts also. Many thanks

    0
    Comment actions Permalink
  • Christian Bacher

    Sorry, i don't understand what do you mean with "computer accounts" in this case

    Example?

    0
    Comment actions Permalink
  • Chris James

    Hi see attached

    enter image description here

    0
    Comment actions Permalink
  • Christian Bacher

    All i see is a local user account called "admin.local"

    You can remove him with:

    net localgroup Administrators admin.local /delete

    0
    Comment actions Permalink

Please sign in to leave a comment.