Login | |
|
 |
RE: Disabling local users - 1/3/2008 6:01:02 AM
|
|
 |
|
| |
ebgreen
Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
|
Set objNetwork = CreateObject("Wscript.Network") strComputer = "." Set colAccounts = GetObject("WinNT://" & strComputer & "") colAccounts.Filter = Array("user") For Each objUser In colAccounts 'disable only users starting with USR if UCase(Left(objUser.Name, 3)) = "USR" Then objUser.AccountDisabled = true objUser.SetInfo End If Next
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|