• 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!
0
drsst4
Asked:
drsst4
  • 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
0
 
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
0
 
drsst4Author Commented:
works w %username%
0
 
poseidoncanuckCommented:
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:

http://support.microsoft.com/default.aspx?scid=kb;en-us;228496

Check out the Windows XP Security Guide for more details on the Restricted Groups feature:
http://go.microsoft.com/fwlink/?LinkId=14840

And check out this article for some troubleshooting tips that may be helpful when you start using this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;320099
0

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