-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDisableServices.ps1
103 lines (103 loc) · 4.62 KB
/
DisableServices.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
function DisableServices(){
#################################################################
Write-Warning 'Disabling Unneeded Windows services...'
[Array]$Services =
'lmhosts', # TCP/IP NetBIOS Helper
#'wlidsvc', # Microsoft Account Sign-in Assistant
'SEMgrSvc', # Payments NFC/SE Manager
'tzautoupdate', # Auto Time Zone Updater
'AppVClient', # Microsoft App-V Client
'RemoteRegistry', # Remote Registry
'RemoteAccess', # Routing & Remote Access
'shpamsvc', # Shared PC Account Manager
'UevAgentService', # User Experience Virtualization Service
'WdiServiceHost', # Diagnostic Service Host
'WdiSystemHost', # Diagnostic System Host
'ALG', # Application Layer Gateway
'PeerDistSvc', # BranchCache
'Eaphost', # Extensible Authentication Protocol
'fdPHost', # function Discovery Provider Host
'LxpSvc', # Language Experience Service
'lltdsvc', # Link-Layer Topology Discovery Mapper
'diagnosticshub.standardcollector.service', # Microsoft (R) Diagnostics Hub Standard Collector Service
'MSiSCSI', # Microsoft iSCSI Initiator Service
'WpcMonSvc', # Parental Control
'PNRPsvc', # Peer Name Resolution Protocol
'p2psvc', # Peer Networking Grouping
'p2pimsvc', # Peer Networking Identity Manager
'PerfHost', # Performance Counter DLL Host
'pla', # Performance Logs & Alerts
'PNRPAutoReg', # PNRP Machine Name Publication
'PrintNotify', # PrintNotify
'wercplsupport', # Problem Reports & Solutions Control Panel
'TroubleshootingSvc', # Recommended Troubleshooting Service
'SessionEnv', # Remote Desktop Configuration
'TermService', # Remote Desjtop Service
'UmRdpService', # Remote Desktop Services UserMode Port Redirector
'RpcLocator', # Remote Procedure Call (RPC) Locator
'RetailDemo', # Retail Demo Service
'SCPolicySvc', # Smart Card Removal Policy
'SNMPTRAP', # SNMP Trap
'SharedRealitySvc', # Spatial Data Service
'WiaRpc', # Still Image Acquisition Events
'VacSvc', # Volumetric Audio Compositor Service
'WalletService', # WalletService
'wcncsvc', # Windows Connect Now
'Wecsvc', # Windows Event Collector
'perceptionsimulation', # Windows Perception Simulation Service
'WinRM', # Windows Remote Management (WS-Management)
'wmiApSrv', # WMI Performance Adapter
'WwanSvc', # WWAN AutoConfig
'XblAuthManager', # Xbox Live Auth Manager
'XboxNetApiSvc', # Xbox Live Networking Service
'RasAuto', # Remote Access Auto Connection Manager
'XblGameSave', # Xbox Live Game Save
'XboxGipSvc', # Xbox Accessory Management
'PushToInstall', # Windows PushToInstall Service
'spectrum', # Windows Perception Service
'icssvc', # Windows Mobile Hotspot Service
'wisvc', # Windows Insider Service
'WerSvc', # Windows Error Reporting Service
'dmwappushservice', # Device Management Wireless Application Protocol (WAP) Push message Routing Service
'FrameServer', # Windows Camera Frame Service
'WFDSConMgrSvc', # Wi-Fi Direct Services Connection Manager Service
'ScDeviceEnum', # Smart Card Device Enumeration Service
'SCardSvr', # Smart Card
'PhoneSvc', # Phone Service
'IpxlatCfgSvc', # IP Translation Configuration Service
'SharedAccess', # Internet Connection Sharing (ICS)
'vmicvss', # Hyper-V Volume Shadow Copy Requestor
'vmictimesync', # Hyper-V TIme Synchronization Service
'vmicrdv', # Hyper-V Remote Desktop Virtualization Service
'vmicvmsession', # Hyper-V PowerShell Direct Service
'vmicheartbeat', # Hyper-V Heartbeat Service
'vmicshutdown', # Hyper-V Guest Shudown Service
'vmicguestinterface', # Hyper-V Guest Service Interface
'vmickvpexchange', # Hyper-V Data Exchange Service
'HvHost', # HV Host Service
'FDResPub', # function Discovery Resource Publication
'diagsvc', # Diagnostic Execution Service
'autotimesvc', # Cellular Time
'bthserv', # Bluetooth Support Service
'BTAGService', # Bluetooth Audio Gateway Service
'AssignedAccessManagerSvc', # AssignedAccessManager Service
'AJRouter', # AllJoyn Router Service
'lfsvc', # Geolocation Service
'CDPSvc', # Connected Devices Platform Service
'DiagTrack', # Connected User Experiences and Telemetry
'DPS', # Diagnostic Policy Service
'iphlpsvc', # IP Helper
'RasMan', # Remote Access Connection Manager
'SstpSvc', # Secure Socket Tunneling Protocol Service
'ShellHWDetection', # Shell Hardware Detection
'SSDPSRV', # SSDP Discovery
'WbioSrvc', # Windows Biometric Service
'stisvc', # Windows Image Acquisition (WIA)
'MessagingService', # Instant messaging Universal Windows Platform Service
'PcaSvc' # Program Compatibility Assistant (PCA)
Foreach ($Service in $Services) {
Set-Service -Name $Service -StartupType 'Disabled'
Stop-Service -Name $Service -Force
}
Write-Host 'Done.'
}