Login Register






Simple Batch Virus filter_list
Author
Message
RE: Simple Batch Virus #5
For the Random User account creation, i've already created a script that will delete all of the junk ones if something like that were to happen:

Code:
$Comp = "." $UsrAccounts = get-wmiobject -class "Win32_UserAccount" -namespace "root\CIMV2" ` -filter "LocalAccount = True" -computername $Comp write-host > del_users.txt foreach ($objItm in $UsrAccounts) { if ($objItm.Name -ne $env:username ` -and $objItm.Name -ne "Administrator" ` -and $objItm.Name -ne "Guest") { $objItm.Name >> del_users.txt } } $del_array = get-content del_users.txt | %{ $_ } foreach ($str in $del_array) { net users $str /del }

Deletes everything BUT the Administrator, Guest, and the main User account created when you first install Windows. If you have any others, you'd just have to add them in my if statement logic to avoid deleting them.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply





Messages In This Thread
Simple Batch Virus - by H4R0015K - 08-24-2012, 06:11 PM