I need to remove a local user on about 500 machines. Is there a way to do this globally or with a WMI script?
Announcement
Collapse
No announcement yet.
Remove local user
Collapse
X
-
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
-
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 youhttp://www.othclan.net/downloads/pri...eLocalUser.rar
[This message has been edited by Trammel (edited 09-12-2005).]
Comment
Comment