Announcement

Collapse
No announcement yet.

Remove local user

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove local user

    I need to remove a local user on about 500 machines. Is there a way to do this globally or with a WMI script?

  • #2
    Re: Remove local user

    In the left pane have your OU. Then on the right highlight all the computers you want to run against. Then right click, select more functions, add remove group member. Then here is an example of what you can do. Use the txt file to ensure they completed.

    Comment


    • #3
      Re: Remove local user

      That's great for removing the user from a local group but, I need to be able to remove the user from the machine.

      Comment


      • #4
        Re: Remove local user

        I don't have a cost-effective way of doing this, so it would have to be done with a script.
        Kevin Stanush
        SystemTools Software Inc.

        Comment


        • #5
          Re: Remove local user

          I have set up a GPO to run a logon script but, it's running everything on the domain level and not the local machine side. Here is an example of the script.

          @echo off
          net localgroup administrators <username> /delete

          net user <username> /delete

          Comment


          • #6
            Re: Remove local user

            I have a vbs script that will disable an account on a local machine. Would this be enough? Do you realy need to delete it?

            Comment


            • #7
              Re: Remove local user

              That would really be helpful. We've got another audit coming in October and I have to have something done with this account.

              Comment


              • #8
                Re: Remove local user

                Ok, here is the vbs file. There is a example DAT file in the rar. This was made to run in a cscript command. The DAT file should have a list of all the host names. One machine per line. Example of command <span style="font-weight: bold">cscript disablelocalusers.vbs filename.dat</span>
                The vbs file was made for a local account named "user" that we had on our machines. So I think if you edit this vbs file and replace the domain name "valueoptions" with your domain name and then you need to change the value of <span style="font-weight: bold">user</span> with the account name your wanting to disable. I am not sure if it will work but I think it should as long as you edit it correctly. You can put the append command on it so you can go through the results.
                <span style="font-weight: bold">cscript disablelocalusers.vbs filename.dat >>results.txt</span>

                Hope this works for you http://www.othclan.net/downloads/pri...eLocalUser.rar

                [This message has been edited by Trammel (edited 09-12-2005).]

                Comment


                • #9
                  Re: Remove local user

                  Thanks alot

                  Comment

                  Working...
                  X