• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Removing NT domain account from workstation local administrator group

Current configuration for all of our 2k workstations included adding the NT domain user to the local administrator group.  Looking to remove via batch or script.  Are there any wild cards that can be used to remove any user from a domain from that group? Thanks!
  • 2
2 Solutions
Gary DewrellSenior Network AdministratorCommented:
Hi drsst4,

It has been a while since I have done this but if memory serves correct you could issue this command via script.

net localgroup "Administrators" "Account to delete" /delete

God Bless
drsst4Author Commented:
thats what I was looking at as well...just curious if there are wild cards available for "Account to Delete".  ie DOMAIN NAME\* , in an effort to remove any domain accounts. Thanks
drsst4Author Commented:
works w %username%
If you're using Active Directory, you could also push down a Group Policy that sets the membership of the Administrators group using the Computer Configuration > Windows Settings > Security Settings > Restricted Groups.  This allows you to specify a list of users and/or groups that you define to be members of the "restricted group".  Any account/group that's currently a member of that restricted group, but which you don't list in your policy, will be removed from the group membership:


Check out the Windows XP Security Guide for more details on the Restricted Groups feature:

And check out this article for some troubleshooting tips that may be helpful when you start using this:

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now