From 5ed09244c8595ab2aa25aa343bef54aa96833b2a Mon Sep 17 00:00:00 2001 From: MagicLike <82117109+MagicLike@users.noreply.github.com> Date: Sat, 8 May 2021 10:09:26 +0200 Subject: [PATCH] Added a script to (re-)enable Windows services --- scripts/enable-services.ps1 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/enable-services.ps1 diff --git a/scripts/enable-services.ps1 b/scripts/enable-services.ps1 new file mode 100644 index 0000000..90918f5 --- /dev/null +++ b/scripts/enable-services.ps1 @@ -0,0 +1,32 @@ +# Description: +# This script (re-)enables Windows services. +# If you do not want to enable 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) + "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 / re-enabled + #"WdNisSvc" +) + +foreach ($service in $services) { + Write-Output "Trying to enable $service" + Get-Service -Name $service | Set-Service -StartupType Automatic +}