Re: Script

From: Roger Abell (mvpNOSpam_at_asu.edu)
Date: 06/01/05


Date: Tue, 31 May 2005 21:56:43 -0700

Such could certainly be written, and likely has.
If you do not know scripting you would need someone to customize
the logic for criteria controlling the remove.
At a cmd prompt one may issue
net localgroup administrators
to see the complete membership of the administrators group.
If you see an account xxx that should be removed you may issue
net localgroup administrators xxx /delete

-- 
Roger Abell
Microsoft MVP (Windows  Security)
MCSE (W2k3,W2k,Nt4)  MCDBA
"BarbS" <BarbS@discussions.microsoft.com> wrote in message
news:718BA2E5-101F-4767-A0C6-1DC06BDD364F@microsoft.com...
> Is there a script to check if an account is in the administrators group
and
> to remove the account from the adminstrator group?
>
> This is for a windows  2003 server without AD. Thank You.


Relevant Pages

  • Re: Script for creating a new user
    ... I want to create a local user. ... Creating a local user and adding it to the Administrators group ... ' Use error handling in case the account is a member already ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)
  • Re: Scripting remote WMI problem
    ... Just that the account on my ... computer that i know for certain to have admin rights on the domain server ... is listed only as the member of Administrators group, ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsxp.general)
  • Re: Promoting an user to a power user
    ... > member of more groups. ... > Account in Control Panel, which allows to switch between Computer ... > Administrators group and Users group, how could I switch between them? ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.security_admin)
  • Re: wierd batch file behavior
    ... net localgroup Administrators /add Admin /domain ... backspace),and finally make that account an administrator. ... I've scheduled this batch file to be run every week on a remote computer ...
    (microsoft.public.win2000.general)
  • Re: SiteSystemToSQLConnection Membership
    ... Things I would try are removing and re-adding the account. ... & Reboot the MP (allthough this shouldn't be necessary, ... > I assume you want me to do this on the SQL server (which is also the SMS Site ...
    (microsoft.public.sms.setup)