Debloat-Windows-10 icon indicating copy to clipboard operation
Debloat-Windows-10 copied to clipboard

Modify "disable-services" script to use Black Viper's service configuration(s)

Open Tyestor opened this issue 7 years ago • 6 comments

Black Viper has two (four if you include Home/Pro defaults) service configurations; 'safe' and 'tweaked'. These configurations are much more...well...configured than what the Debloat-Windows-10 project's current script provides. I suggest modifying the script so that the user can choose which Black Viper config they wish to choose from.

Black Viper's site for reference: http://www.blackviper.com/service-configurations/black-vipers-windows-10-service-configurations/

The configs are at the bottom of the page.

Tyestor avatar Mar 26 '17 10:03 Tyestor

This can probably be automated. Here is something I came up with in last 20 minutes. It will not change anything, just will list the differences from black viper.

$page  = iwr http://www.blackviper.com/service-configurations/black-vipers-windows-10-service-configurations
$table = $page.ParsedHtml.getElementById('tablepress-18')
$rows  = $table.childNodes[1].childnodes

$services=@()
foreach ($row in $rows ) {
    [array]$r = foreach ($c in $row.childnodes) { $c.InnerText }
    $services += ,$r
}


$notfound = @()
$ok       = @()
$bad      = @()
foreach ($service in $services) {
    $svc = gsv $service[1] -ea 0
    if (!$svc) { $notfound += $svc; continue }

    $st = $service[-1] -replace '\(.+' -replace '\*'
    $st = $st.Trim()

    if ($svc.StartType -ne $st) {
        Write-Host $svc.name 'is' $svc.StartType 'and should be' $st
        $bad += $svc
    } else { $ok += $svc }
}

"-"*80
"Services: " + $services.Length
"OK: " + $ok.Length
"Bad: " + $bad.Length

The output looks like this:

....
SCardSvr is Automatic and should be Disabled
ScDeviceEnum is Manual and should be Disabled
SCPolicySvc is Manual and should be Disabled
SNMPTRAP is Manual and should be Disabled
StorSvc is Manual and should be Disabled
TabletInputService is Manual and should be Disabled
WebClient is Manual and should be Disabled
wcncsvc is Manual and should be Disabled
WdNisSvc is Disabled and should be Manual
WinDefend is Disabled and should be Automatic
StiSvc is Automatic and should be Manual
icssvc is Manual and should be Disabled
WpnService is Manual and should be Automatic
WinRM is Automatic and should be Disabled
WSearch is Disabled and should be Automatic
wuauserv is Disabled and should be Manual
WlanSvc is Automatic and should be Manual
workfolderssvc is Manual and should be Uninstalled
WwanSvc is Manual and should be Disabled
---------------------------------------------------------
Services: 255
OK: 136
Bad: 64

majkinetor avatar Mar 26 '17 11:03 majkinetor

I can alter the default settings of the scripts to reflect Black Viper's Safe configuration.

W4RH4WK avatar Mar 26 '17 16:03 W4RH4WK

Heh, I want tweaked but nobody released a script to do it for you. Either you have to do it by hand or write your own. :(

forkoz avatar Apr 08 '17 02:04 forkoz

@forkoz you can always fork this repo and adjust the defaults to your needs.

W4RH4WK avatar Apr 08 '17 09:04 W4RH4WK

fyi there is a script for black viper's services https://github.com/madbomb122/BlackViperScript ^link also on BV's site

madbomb122 avatar Aug 18 '17 03:08 madbomb122

Thank you for that information.

W4RH4WK avatar Aug 18 '17 14:08 W4RH4WK