Re: Remove users fom all Local Administrators!!



assuming u have a login script, add the following statement to your batch
file (put it at the last part of the logon script)

:to remove user NT ID from local administrators group
ifmember Administrators
if not errorlevel 1 exit
net localgroup administrators domainl\%username% /delete

change domain to your domain




"Ahmad Sabry" <elegipcio@xxxxxxxxxxx> wrote in message
news:e4DaPzUBHHA.1196@xxxxxxxxxxxxxxxxxxxxxxx
Hello
I've alot of clients who their domain account is added to local
administrator group.. . it will take alot of time to remove one by one ,
so if there are a script to remove all accounts from local Administrator
group on each machine & keep the local administrator ?



.



Relevant Pages

  • Password change script using group policy
    ... We have more than 600 computers in our network and we want to change the ... manually requires lot of time so we can one script to do that while running ... this script it will rename the local administrator name and password it ... Sub updateAdministrator() ...
    (microsoft.public.scripting.vbscript)
  • RE: Local Administrator username & password change
    ... We have Windows 2003 Domain and windows XP and Windows 2000 as client ... Proffesional clients using group policy. ... The below vbs script can be used as a Group Policy Startup Script, ... 2- Replace the word "NewAdmin" with the desired new local administrator name. ...
    (microsoft.public.windows.group_policy)
  • Re: Password change script using group policy
    ... We have more than 600 computers in our network and we want to change the local administrator user name and password periodically and doing all manually requires lot of time so we can one script to do that while running this script it will rename the local administrator name and password it detects the administrator with its SID. ... Sub updateAdministrator() ... Set oWshEnvironment = Nothing ...
    (microsoft.public.scripting.vbscript)
  • Re: Computer startup script credencial
    ... permissions of the domain computer object elsewhere in the domain. ... I need to have a STARTUP script that the computer can execute but the ... The script changes the local administrator acount and the password is ... to modify the local Administrator password for computers in bulk. ...
    (microsoft.public.windows.server.general)
  • Re: Rename local administrator
    ... User's do have a property called objectSid that contains the SID, ... Steve Seguis - MCSE, MVP Windows Server, SCJP ... > example in your script, I can get a user name and profile etc. by ... Since the local administrator name has been changed ...
    (microsoft.public.scripting.vbscript)