Debloat-Windows-10/scripts/disable-services.ps1

35 lines
1.9 KiB
PowerShell
Raw Normal View History

2015-08-03 22:15:03 +00:00
# Description:
# This script disables unwanted Windows services. If you do not want to disable
# certain services comment out the corresponding lines below.
$services = @(
"diagnosticshub.standardcollector.service" # Microsoft (R) Diagnostics Hub Standard Collector Service
"DiagTrack" # Diagnostics Tracking Service
"dmwappushservice" # WAP Push Message Routing Service
"HomeGroupListener" # HomeGroup Listener
"HomeGroupProvider" # HomeGroup Provider
"lfsvc" # Geolocation Service
"MapsBroker" # Downloaded Maps Manager
"NetTcpPortSharing" # Net.Tcp Port Sharing Service
"RemoteAccess" # Routing and Remote Access
"RemoteRegistry" # Remote Registry
"SharedAccess" # Internet Connection Sharing (ICS)
"TrkWks" # Distributed Link Tracking Client
"WbioSrvc" # Windows Biometric Service
#"WlanSvc" # WLAN AutoConfig
"WMPNetworkSvc" # Windows Media Player Network Sharing Service
"wscsvc" # Windows Security Center Service
#"WSearch" # Windows Search
"XblAuthManager" # Xbox Live Auth Manager
"XblGameSave" # Xbox Live Game Save Service
"XboxNetApiSvc" # Xbox Live Networking Service
2015-08-20 20:33:36 +00:00
# Services which cannot be disabled
#"WdNisSvc"
2015-08-03 22:15:03 +00:00
)
foreach ($service in $services) {
echo "Trying to disable $service"
2015-08-07 13:55:13 +00:00
Get-Service -Name $service | Set-Service -StartupType Disabled
2015-08-06 20:26:14 +00:00
}