-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisable-services.ps1
58 lines (57 loc) · 2.47 KB
/
disable-services.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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 (see known issues)
"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 (required for Fingerprint reader / facial detection)
#"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
"ndu" # Windows Network Data Usage Monitor
# Services which cannot be disabled
"WdNisSvc"
"SSDPSRV"
"lfsvc"
"AXInstSV"
"AJRouter"
"AppReadiness"
"HomeGroupListener"
"HomeGroupProvider"
"SharedAccess"
"lltdsvc"
"diagnosticshub.standardcollector.service"
"wlidsvc"
"SmsRouter"
"NcdAutoSetup"
"PNRPsvc"
"p2psvc"
"p2pimsvc"
"PNRPAutoReg"
"WalletService"
"WMPNetworkSvc"
"icssvc"
"XblAuthManager"
"XblGameSave"
"XboxNetApiSvc"
"DmEnrollmentSvc"
"RetailDemo"
)
foreach ($service in $services) {
Write-Output "Trying to disable $service"
Get-Service -Name $service | Set-Service -StartupType Disabled
}