From d1535dbad4a4a55d14f3892012d2c6f55a857580 Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Wed, 2 Jun 2021 21:28:45 -0400 Subject: [PATCH 1/9] windows 10 service disabler.ps1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this will be the last version of the script the last one the pervious ones i forgot to put the .ps1 extention at the end lol😂 anyways it disables useless windows 10 services. --- .../windows 10 service disabler.ps1 | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 Individual Scripts/windows 10 service disabler.ps1 diff --git a/Individual Scripts/windows 10 service disabler.ps1 b/Individual Scripts/windows 10 service disabler.ps1 new file mode 100644 index 00000000..cb0565cf --- /dev/null +++ b/Individual Scripts/windows 10 service disabler.ps1 @@ -0,0 +1,112 @@ +# Description: +# This script disables unwanted Windows services. If you do not want to disable +# certain services comment out the corresponding lines below. like this #use hastag to comment + +$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 + "XboxGipSvc" #Disables Xbox Accessory Management Service + "ndu" # Windows Network Data Usage Monitor + "WerSvc" #disables windows error reporting + "Spooler" #Disables your printer + "Fax" #Disables fax + "fhsvc" #Disables fax histroy + "gupdate" #Disables google update + "gupdatem" #Disable another google update + "stisvc" #Disables Windows Image Acquisition (WIA) + "AJRouter" #Disables (needed for AllJoyn Router Service) + "MSDTC" # Disables Distributed Transaction Coordinator + "dmwappushservice" #Device Management Wireless Application Protocol (WAP) Push message Routing Service + "WpcMonSvc" #Disables Parental Controls + "PhoneSvc" #Disables Phone Service(Manages the telephony state on the device) + "PrintNotify" #Disables Windows printer notifications and extentions + "PcaSvc" #Disables Program Compatibility Assistant Service + "WPDBusEnum" #Disables Portable Device Enumerator Service + "LicenseManager" #Disable LicenseManager(Windows store may not work properly) + "seclogon" #Disables Secondary Logon(disables other credentials only password will work) + "SysMain" #Disables sysmain + "lmhosts" #Disables TCP/IP NetBIOS Helper + "wisvc" #Disables Windows Insider program(Windows Insider will not work) + "FontCache" #Disables Windows font cache + "RetailDemo" #Disables RetailDemo whic is often used when showing your device + "ALG" # Disables Application Layer Gateway Service(Provides support for 3rd party protocol plug-ins for Internet Connection Sharing) + #"BFE" #Disables Base Filtering Engine (BFE) (is a service that manages firewall and Internet Protocol security) + #"BrokerInfrastructure" #Disables Windows infrastructure service that controls which background tasks can run on the system. + "SCardSvr" #Disables Windows smart card + "lfsvc" #Disable Windows geolocation service it can be use to track you + "EntAppSvc" #Disables enterprise application management. + "BthAvctpSvc" #Disables AVCTP service (if you use Bluetooth Audio Device or Wireless Headphones. then don't disable this) + "FrameServer" #Disables Windows Camera Frame Server(this allows multiple clients to access video frames from camera devices.) + "Browser" #Disables computer browser + "BthAvctpSvc" #AVCTP service (This is Audio Video Control Transport Protocol service.) + "BDESVC" #Disables bitlocker + "fhsvc" # Disables File History Service (Protects user files from accidental loss by copying them to a backup location.) + "iphlpsvc" #Disables ipv6 but most websites don't use ipv6 they use ipv4 + "edgeupdate" # Disables one of edge update service + "MicrosoftEdgeElevationService" # Disables one of edge service + "edgeupdatem" # disbales another one of update service (disables edgeupdatem) + "SEMgrSvc" #Disables Payments and NFC/SE Manager (Manages payments and Near Field Communication (NFC) based secure elements) + #"PNRPsvc" # Disables peer Name Resolution Protocol ( some peer-to-peer and collaborative applications, such as Remote Assistance, may not function, Discord will still work) + #"p2psvc" # Disbales Peer Name Resolution Protocol(nables multi-party communication using Peer-to-Peer Grouping. If disabled, some applications, such as HomeGroup, may not function. Discord will still work) + #"p2pimsvc" # Disables Peer Networking Identity Manager (Peer-to-Peer Grouping services may not function, and some applications, such as HomeGroup and Remote Assistance, may not function correctly.Discord will still work) + "PerfHost" #Disables remote users and 64-bit processes to query performance . + + + + # Services which cannot be disabled + #"WdNisSvc" +) + +foreach ($service in $services) { + Write-Output "Trying to disable $service" + Get-Service -Name $service | Set-Service -StartupType Disabled +} + +$hyper = @( + #hyper-v services + "HvHost" + "vmickvpexchange" + "vmicguestinterface" + "vmicshutdown" + "vmicheartbeat" + "vmicvmsession" + "vmicrdv" + "vmictimesync" + +) + + +foreach ($hyper in $hyper) { + Write-Output "Trying to disable $hyper-v" + Get-Service -Name $service | Set-Service -StartupType Disabled +} + +$hp = @( + #hp services + "HPAppHelperCap" + "HPDiagsCap" + "HPNetworkCap" + "HPSysInfoCap" + "HpTouchpointAnalyticsService" +) + + foreach ($hp in $hp) { + Write-Output "Trying to disable $hp" + Get-Service -Name $service | Set-Service -StartupType Disabled +} From 420e3422d9b296dadc2113bbf6e53d8182d34f20 Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Fri, 4 Jun 2021 18:22:05 -0400 Subject: [PATCH 2/9] windows 10 service disabler.ps1 added a few more services the script --- Individual Scripts/windows 10 service disabler.ps1 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Individual Scripts/windows 10 service disabler.ps1 b/Individual Scripts/windows 10 service disabler.ps1 index cb0565cf..93e6d060 100644 --- a/Individual Scripts/windows 10 service disabler.ps1 +++ b/Individual Scripts/windows 10 service disabler.ps1 @@ -14,7 +14,7 @@ $services = @( "SharedAccess" # Internet Connection Sharing (ICS) "TrkWks" # Distributed Link Tracking Client "WbioSrvc" # Windows Biometric Service (required for Fingerprint reader / facial detection) - "WlanSvc" # WLAN AutoConfig + #"WlanSvc" # WLAN AutoConfig "WMPNetworkSvc" # Windows Media Player Network Sharing Service "wscsvc" # Windows Security Center Service "WSearch" # Windows Search @@ -52,7 +52,7 @@ $services = @( "lfsvc" #Disable Windows geolocation service it can be use to track you "EntAppSvc" #Disables enterprise application management. "BthAvctpSvc" #Disables AVCTP service (if you use Bluetooth Audio Device or Wireless Headphones. then don't disable this) - "FrameServer" #Disables Windows Camera Frame Server(this allows multiple clients to access video frames from camera devices.) + #"FrameServer" #Disables Windows Camera Frame Server(this allows multiple clients to access video frames from camera devices.) "Browser" #Disables computer browser "BthAvctpSvc" #AVCTP service (This is Audio Video Control Transport Protocol service.) "BDESVC" #Disables bitlocker @@ -66,6 +66,16 @@ $services = @( #"p2psvc" # Disbales Peer Name Resolution Protocol(nables multi-party communication using Peer-to-Peer Grouping. If disabled, some applications, such as HomeGroup, may not function. Discord will still work) #"p2pimsvc" # Disables Peer Networking Identity Manager (Peer-to-Peer Grouping services may not function, and some applications, such as HomeGroup and Remote Assistance, may not function correctly.Discord will still work) "PerfHost" #Disables remote users and 64-bit processes to query performance . + "BcastDVRUserService_48486de" #Disables GameDVR and Broadcast is used for Game Recordings and Live Broadcasts + "CaptureService_48486de" #Disables ptional screen capture functionality for applications that call the Windows.Graphics.Capture API. + "cbdhsvc_48486de" #Disables cbdhsvc_48486de (clipboard service it disables) + "BluetoothUserService_48486de" #disbales BluetoothUserService_48486de (The Bluetooth user service supports proper functionality of Bluetooth features relevant to each user session.) + "WpnService" #Disables WpnService (Push Notifications may not work ) + #"StorSvc" #Disables StorSvc (usb external hard drive will not be reconised by windows) + "RtkBtManServ" #Disables Realtek Bluetooth Device Manager Service + "QWAVE" #Disables Quality Windows Audio Video Experience (audio and video might sound worse) + + From 629a3cff84e7ec7126af270059fefdafe1133180 Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Tue, 8 Jun 2021 11:40:07 -0700 Subject: [PATCH 3/9] Update Individual Scripts/windows 10 service disabler.ps1 Co-authored-by: Ian Holloway <72767437+IanHollow@users.noreply.github.com> --- Individual Scripts/windows 10 service disabler.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Individual Scripts/windows 10 service disabler.ps1 b/Individual Scripts/windows 10 service disabler.ps1 index 93e6d060..4c14023d 100644 --- a/Individual Scripts/windows 10 service disabler.ps1 +++ b/Individual Scripts/windows 10 service disabler.ps1 @@ -51,7 +51,7 @@ $services = @( "SCardSvr" #Disables Windows smart card "lfsvc" #Disable Windows geolocation service it can be use to track you "EntAppSvc" #Disables enterprise application management. - "BthAvctpSvc" #Disables AVCTP service (if you use Bluetooth Audio Device or Wireless Headphones. then don't disable this) + #"BthAvctpSvc" #Disables AVCTP service (if you use Bluetooth Audio Device or Wireless Headphones. then don't disable this) #"FrameServer" #Disables Windows Camera Frame Server(this allows multiple clients to access video frames from camera devices.) "Browser" #Disables computer browser "BthAvctpSvc" #AVCTP service (This is Audio Video Control Transport Protocol service.) From ed7fe85ebaa4998333c9c4e80d9f90ac7bab619a Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Tue, 8 Jun 2021 11:43:07 -0700 Subject: [PATCH 4/9] Delete windows 10 service disabler.ps1 --- .../windows 10 service disabler.ps1 | 122 ------------------ 1 file changed, 122 deletions(-) delete mode 100644 Individual Scripts/windows 10 service disabler.ps1 diff --git a/Individual Scripts/windows 10 service disabler.ps1 b/Individual Scripts/windows 10 service disabler.ps1 deleted file mode 100644 index 4c14023d..00000000 --- a/Individual Scripts/windows 10 service disabler.ps1 +++ /dev/null @@ -1,122 +0,0 @@ -# Description: -# This script disables unwanted Windows services. If you do not want to disable -# certain services comment out the corresponding lines below. like this #use hastag to comment - -$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 - "XboxGipSvc" #Disables Xbox Accessory Management Service - "ndu" # Windows Network Data Usage Monitor - "WerSvc" #disables windows error reporting - "Spooler" #Disables your printer - "Fax" #Disables fax - "fhsvc" #Disables fax histroy - "gupdate" #Disables google update - "gupdatem" #Disable another google update - "stisvc" #Disables Windows Image Acquisition (WIA) - "AJRouter" #Disables (needed for AllJoyn Router Service) - "MSDTC" # Disables Distributed Transaction Coordinator - "dmwappushservice" #Device Management Wireless Application Protocol (WAP) Push message Routing Service - "WpcMonSvc" #Disables Parental Controls - "PhoneSvc" #Disables Phone Service(Manages the telephony state on the device) - "PrintNotify" #Disables Windows printer notifications and extentions - "PcaSvc" #Disables Program Compatibility Assistant Service - "WPDBusEnum" #Disables Portable Device Enumerator Service - "LicenseManager" #Disable LicenseManager(Windows store may not work properly) - "seclogon" #Disables Secondary Logon(disables other credentials only password will work) - "SysMain" #Disables sysmain - "lmhosts" #Disables TCP/IP NetBIOS Helper - "wisvc" #Disables Windows Insider program(Windows Insider will not work) - "FontCache" #Disables Windows font cache - "RetailDemo" #Disables RetailDemo whic is often used when showing your device - "ALG" # Disables Application Layer Gateway Service(Provides support for 3rd party protocol plug-ins for Internet Connection Sharing) - #"BFE" #Disables Base Filtering Engine (BFE) (is a service that manages firewall and Internet Protocol security) - #"BrokerInfrastructure" #Disables Windows infrastructure service that controls which background tasks can run on the system. - "SCardSvr" #Disables Windows smart card - "lfsvc" #Disable Windows geolocation service it can be use to track you - "EntAppSvc" #Disables enterprise application management. - #"BthAvctpSvc" #Disables AVCTP service (if you use Bluetooth Audio Device or Wireless Headphones. then don't disable this) - #"FrameServer" #Disables Windows Camera Frame Server(this allows multiple clients to access video frames from camera devices.) - "Browser" #Disables computer browser - "BthAvctpSvc" #AVCTP service (This is Audio Video Control Transport Protocol service.) - "BDESVC" #Disables bitlocker - "fhsvc" # Disables File History Service (Protects user files from accidental loss by copying them to a backup location.) - "iphlpsvc" #Disables ipv6 but most websites don't use ipv6 they use ipv4 - "edgeupdate" # Disables one of edge update service - "MicrosoftEdgeElevationService" # Disables one of edge service - "edgeupdatem" # disbales another one of update service (disables edgeupdatem) - "SEMgrSvc" #Disables Payments and NFC/SE Manager (Manages payments and Near Field Communication (NFC) based secure elements) - #"PNRPsvc" # Disables peer Name Resolution Protocol ( some peer-to-peer and collaborative applications, such as Remote Assistance, may not function, Discord will still work) - #"p2psvc" # Disbales Peer Name Resolution Protocol(nables multi-party communication using Peer-to-Peer Grouping. If disabled, some applications, such as HomeGroup, may not function. Discord will still work) - #"p2pimsvc" # Disables Peer Networking Identity Manager (Peer-to-Peer Grouping services may not function, and some applications, such as HomeGroup and Remote Assistance, may not function correctly.Discord will still work) - "PerfHost" #Disables remote users and 64-bit processes to query performance . - "BcastDVRUserService_48486de" #Disables GameDVR and Broadcast is used for Game Recordings and Live Broadcasts - "CaptureService_48486de" #Disables ptional screen capture functionality for applications that call the Windows.Graphics.Capture API. - "cbdhsvc_48486de" #Disables cbdhsvc_48486de (clipboard service it disables) - "BluetoothUserService_48486de" #disbales BluetoothUserService_48486de (The Bluetooth user service supports proper functionality of Bluetooth features relevant to each user session.) - "WpnService" #Disables WpnService (Push Notifications may not work ) - #"StorSvc" #Disables StorSvc (usb external hard drive will not be reconised by windows) - "RtkBtManServ" #Disables Realtek Bluetooth Device Manager Service - "QWAVE" #Disables Quality Windows Audio Video Experience (audio and video might sound worse) - - - - - - # Services which cannot be disabled - #"WdNisSvc" -) - -foreach ($service in $services) { - Write-Output "Trying to disable $service" - Get-Service -Name $service | Set-Service -StartupType Disabled -} - -$hyper = @( - #hyper-v services - "HvHost" - "vmickvpexchange" - "vmicguestinterface" - "vmicshutdown" - "vmicheartbeat" - "vmicvmsession" - "vmicrdv" - "vmictimesync" - -) - - -foreach ($hyper in $hyper) { - Write-Output "Trying to disable $hyper-v" - Get-Service -Name $service | Set-Service -StartupType Disabled -} - -$hp = @( - #hp services - "HPAppHelperCap" - "HPDiagsCap" - "HPNetworkCap" - "HPSysInfoCap" - "HpTouchpointAnalyticsService" -) - - foreach ($hp in $hp) { - Write-Output "Trying to disable $hp" - Get-Service -Name $service | Set-Service -StartupType Disabled -} From 4980e2747f8fb995b480dabb2ebd7e38fa788538 Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Tue, 8 Jun 2021 13:26:08 -0700 Subject: [PATCH 5/9] windows service disabler v2.ps1 --- .../windows service disabler v2.ps1 | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 Individual Scripts/windows service disabler v2.ps1 diff --git a/Individual Scripts/windows service disabler v2.ps1 b/Individual Scripts/windows service disabler v2.ps1 new file mode 100644 index 00000000..f7c5ee15 --- /dev/null +++ b/Individual Scripts/windows service disabler v2.ps1 @@ -0,0 +1,150 @@ +# Description: +# This script disables unwanted Windows services. If you do not want to disable +# certain services comment out the corresponding lines below. like this #use hastag to comment + +$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 + "XboxGipSvc" #Disables Xbox Accessory Management Service + "ndu" # Windows Network Data Usage Monitor + "WerSvc" #disables windows error reporting + "Spooler" #Disables your printer + "Fax" #Disables fax + "fhsvc" #Disables fax histroy + "gupdate" #Disables google update + "gupdatem" #Disable another google update + "stisvc" #Disables Windows Image Acquisition (WIA) + "AJRouter" #Disables (needed for AllJoyn Router Service) + "MSDTC" # Disables Distributed Transaction Coordinator + "dmwappushservice" #Device Management Wireless Application Protocol (WAP) Push message Routing Service + "WpcMonSvc" #Disables Parental Controls + "PhoneSvc" #Disables Phone Service(Manages the telephony state on the device) + "PrintNotify" #Disables Windows printer notifications and extentions + "PcaSvc" #Disables Program Compatibility Assistant Service + "WPDBusEnum" #Disables Portable Device Enumerator Service + "LicenseManager" #Disable LicenseManager(Windows store may not work properly) + "seclogon" #Disables Secondary Logon(disables other credentials only password will work) + "SysMain" #Disables sysmain + "lmhosts" #Disables TCP/IP NetBIOS Helper + "wisvc" #Disables Windows Insider program(Windows Insider will not work) + "FontCache" #Disables Windows font cache + "RetailDemo" #Disables RetailDemo whic is often used when showing your device + "ALG" # Disables Application Layer Gateway Service(Provides support for 3rd party protocol plug-ins for Internet Connection Sharing) + #"BFE" #Disables Base Filtering Engine (BFE) (is a service that manages firewall and Internet Protocol security) + #"BrokerInfrastructure" #Disables Windows infrastructure service that controls which background tasks can run on the system. + "SCardSvr" #Disables Windows smart card + "lfsvc" #Disable Windows geolocation service it can be use to track you + "EntAppSvc" #Disables enterprise application management. + "BthAvctpSvc" #Disables AVCTP service (if you use Bluetooth Audio Device or Wireless Headphones. then don't disable this) + #"FrameServer" #Disables Windows Camera Frame Server(this allows multiple clients to access video frames from camera devices.) + "Browser" #Disables computer browser + "BthAvctpSvc" #AVCTP service (This is Audio Video Control Transport Protocol service.) + "BDESVC" #Disables bitlocker + "fhsvc" # Disables File History Service (Protects user files from accidental loss by copying them to a backup location.) + "iphlpsvc" #Disables ipv6 but most websites don't use ipv6 they use ipv4 + "edgeupdate" # Disables one of edge update service + "MicrosoftEdgeElevationService" # Disables one of edge service + "edgeupdatem" # disbales another one of update service (disables edgeupdatem) + "SEMgrSvc" #Disables Payments and NFC/SE Manager (Manages payments and Near Field Communication (NFC) based secure elements) + #"PNRPsvc" # Disables peer Name Resolution Protocol ( some peer-to-peer and collaborative applications, such as Remote Assistance, may not function, Discord will still work) + #"p2psvc" # Disbales Peer Name Resolution Protocol(nables multi-party communication using Peer-to-Peer Grouping. If disabled, some applications, such as HomeGroup, may not function. Discord will still work) + #"p2pimsvc" # Disables Peer Networking Identity Manager (Peer-to-Peer Grouping services may not function, and some applications, such as HomeGroup and Remote Assistance, may not function correctly.Discord will still work) + "PerfHost" #Disables remote users and 64-bit processes to query performance . + "BcastDVRUserService_48486de" #Disables GameDVR and Broadcast is used for Game Recordings and Live Broadcasts + "CaptureService_48486de" #Disables ptional screen capture functionality for applications that call the Windows.Graphics.Capture API. + "cbdhsvc_48486de" #Disables cbdhsvc_48486de (clipboard service it disables) + "BluetoothUserService_48486de" #disbales BluetoothUserService_48486de (The Bluetooth user service supports proper functionality of Bluetooth features relevant to each user session.) + "WpnService" #Disables WpnService (Push Notifications may not work ) + #"StorSvc" #Disables StorSvc (usb external hard drive will not be reconised by windows) + "RtkBtManServ" #Disables Realtek Bluetooth Device Manager Service + "QWAVE" #Disables Quality Windows Audio Video Experience (audio and video might sound worse) + + + + + + # Services which cannot be disabled + #"WdNisSvc" +) + +foreach ($service in $services) { + Write-Output "Trying to disable $service" + Get-Service -Name $service | Set-Service -StartupType Disabled +} + +$hyper = @( + #hyper-v services + "HvHost" + "vmickvpexchange" + "vmicguestinterface" + "vmicshutdown" + "vmicheartbeat" + "vmicvmsession" + "vmicrdv" + "vmictimesync" + +) + + +foreach ($hyper in $hyper) { + Write-Output "Trying to disable $hyper-v" + Get-Service -Name $service | Set-Service -StartupType Disabled +} + +$hp = @( + #hp services + "HPAppHelperCap" + "HPDiagsCap" + "HPNetworkCap" + "HPSysInfoCap" + "HpTouchpointAnalyticsService" +) + + foreach ($hp in $hp) { + Write-Output "Trying to disable $hp" + Get-Service -Name $service | Set-Service -StartupType Disabled +} + + + +#stop service this stop the services +Get-Service diagnosticshub.standardcollector.service | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service DiagTrack | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service dmwappushservice | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service lfsvc | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service MapsBroker | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service NetTcpPortSharing | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service RemoteAccess | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service RemoteRegistry | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service TrkWk | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service WbioSrvc | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service WlanSvc | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service WMPNetworkSvc | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service wscsvc | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service WSearch | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service XblAuthManager | Where {$_.status –eq 'Stopped'} | Stop-Service + + + + + + + + + From a9f5e503d5a8aeaa5a81056dceb7c2ea1b05b1f3 Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Tue, 29 Jun 2021 18:35:57 -0700 Subject: [PATCH 6/9] requested changes added the requested changes you suggested --- .../windows service disabler v2.ps1 | 120 +++++++++++------- 1 file changed, 75 insertions(+), 45 deletions(-) diff --git a/Individual Scripts/windows service disabler v2.ps1 b/Individual Scripts/windows service disabler v2.ps1 index f7c5ee15..0e906d64 100644 --- a/Individual Scripts/windows service disabler v2.ps1 +++ b/Individual Scripts/windows service disabler v2.ps1 @@ -74,23 +74,14 @@ $services = @( #"StorSvc" #Disables StorSvc (usb external hard drive will not be reconised by windows) "RtkBtManServ" #Disables Realtek Bluetooth Device Manager Service "QWAVE" #Disables Quality Windows Audio Video Experience (audio and video might sound worse) - - - - - - # Services which cannot be disabled - #"WdNisSvc" -) - -foreach ($service in $services) { - Write-Output "Trying to disable $service" - Get-Service -Name $service | Set-Service -StartupType Disabled -} - -$hyper = @( + #hp services + "HPAppHelperCap" + "HPDiagsCap" + "HPNetworkCap" + "HPSysInfoCap" + "HpTouchpointAnalyticsService" #hyper-v services - "HvHost" + "HvHost" "vmickvpexchange" "vmicguestinterface" "vmicshutdown" @@ -98,31 +89,15 @@ $hyper = @( "vmicvmsession" "vmicrdv" "vmictimesync" - -) - - -foreach ($hyper in $hyper) { - Write-Output "Trying to disable $hyper-v" - Get-Service -Name $service | Set-Service -StartupType Disabled -} - -$hp = @( - #hp services - "HPAppHelperCap" - "HPDiagsCap" - "HPNetworkCap" - "HPSysInfoCap" - "HpTouchpointAnalyticsService" + # Services which cannot be disabled + #"WdNisSvc" ) - foreach ($hp in $hp) { - Write-Output "Trying to disable $hp" +foreach ($service in $services) { + Write-Output "Trying to disable $service" Get-Service -Name $service | Set-Service -StartupType Disabled } - - #stop service this stop the services Get-Service diagnosticshub.standardcollector.service | Where {$_.status –eq 'Stopped'} | Stop-Service Get-Service DiagTrack | Where {$_.status –eq 'Stopped'} | Stop-Service @@ -139,12 +114,67 @@ Get-Service WMPNetworkSvc | Where {$_.status –eq 'Stopped'} | Stop-Service Get-Service wscsvc | Where {$_.status –eq 'Stopped'} | Stop-Service Get-Service WSearch | Where {$_.status –eq 'Stopped'} | Stop-Service Get-Service XblAuthManager | Where {$_.status –eq 'Stopped'} | Stop-Service - - - - - - - - - +Get-Service XblGameSave | Where {$_.status –eq 'running'} | Stop-Service +Get-Service XboxNetApiSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service XboxGipSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service ndu | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WerSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service Spooler | Where {$_.status –eq 'running'} | Stop-Service +Get-Service Fax | Where {$_.status –eq 'running'} | Stop-Service +Get-Service fhsvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service gupdate | Where {$_.status –eq 'running'} | Stop-Service +Get-Service gupdatem | Where {$_.status –eq 'running'} | Stop-Service +Get-Service stisvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service AJRouter | Where {$_.status –eq 'running'} | Stop-Service +Get-Service MSDTC | Where {$_.status –eq 'running'} | Stop-Service +Get-Service dmwappushservice | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WpcMonSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service PhoneSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service PrintNotify | Where {$_.status –eq 'running'} | Stop-Service +Get-Service PcaSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WPDBusEnum | Where {$_.status –eq 'running'} | Stop-Service +Get-Service LicenseManager | Where {$_.status –eq 'running'} | Stop-Service +Get-Service seclogon | Where {$_.status –eq 'running'} | Stop-Service +Get-Service SysMain | Where {$_.status –eq 'running'} | Stop-Service +Get-Service lmhosts | Where {$_.status –eq 'running'} | Stop-Service +Get-Service wisvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service FontCache | Where {$_.status –eq 'running'} | Stop-Service +Get-Service RetailDemo | Where {$_.status –eq 'running'} | Stop-Service +Get-Service ALG | Where {$_.status –eq 'running'} | Stop-Service +#Get-Service BFE | Where {$_.status –eq 'running'} | Stop-Service +Get-Service BrokerInfrastructure | Where {$_.status –eq 'running'} | Stop-Service +Get-Service SCardSvr | Where {$_.status –eq 'running'} | Stop-Service +Get-Service lfsvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service EntAppSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service BthAvctpSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service BDESVC | Where {$_.status –eq 'running'} | Stop-Service +Get-Service iphlpsvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service edgeupdate | Where {$_.status –eq 'running'} | Stop-Service +Get-Service MicrosoftEdgeElevationService | Where {$_.status –eq 'running'} | Stop-Service +Get-Service edgeupdatem | Where {$_.status –eq 'running'} | Stop-Service +Get-Service SEMgrSvc | Where {$_.status –eq 'running'} | Stop-Service +#Get-Service PNRPsvc | Where {$_.status –eq 'running'} | Stop-Service +#Get-Service p2psvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service p2pimsvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service PerfHost | Where {$_.status –eq 'running'} | Stop-Service +Get-Service BcastDVRUserService_48486de | Where {$_.status –eq 'running'} | Stop-Service +Get-Service CaptureService_48486de | Where {$_.status –eq 'running'} | Stop-Service +Get-Service cbdhsvc_48486de | Where {$_.status –eq 'running'} | Stop-Service +Get-Service BluetoothUserService_48486de | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WpnService | Where {$_.status –eq 'running'} | Stop-Service +Get-Service StorSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service QWAVE | Where {$_.status –eq 'running'} | Stop-Service +Get-Service RtkBtManServ | Where {$_.status –eq 'running'} | Stop-Service +Get-Service HPAppHelperCap | Where {$_.status –eq 'running'} | Stop-Service +Get-Service HPDiagsCap | Where {$_.status –eq 'running'} | Stop-Service +Get-Service HPNetworkCap | Where {$_.status –eq 'running'} | Stop-Service +Get-Service HPSysInfoCap | Where {$_.status –eq 'running'} | Stop-Service +Get-Service HpTouchpointAnalyticsService | Where {$_.status –eq 'running'} | Stop-Service +Get-Service HvHost | Where {$_.status –eq 'running'} | Stop-Service +Get-Service vmickvpexchange | Where {$_.status –eq 'running'} | Stop-Service +Get-Service vmicguestinterface | Where {$_.status –eq 'running'} | Stop-Service +Get-Service vmicshutdown | Where {$_.status –eq 'running'} | Stop-Service +Get-Service vmicheartbeat | Where {$_.status –eq 'running'} | Stop-Service +Get-Service vmicvmsession | Where {$_.status –eq 'running'} | Stop-Service +Get-Service vmicrdv | Where {$_.status –eq 'running'} | Stop-Service +Get-Service vmictimesync | Where {$_.status –eq 'running'} | Stop-Service From ab6ee32480c8354ec6bfcce87b69cdfbd31ddc7b Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Wed, 30 Jun 2021 07:57:45 -0700 Subject: [PATCH 7/9] Update windows service disabler v2.ps1 --- .../windows service disabler v2.ps1 | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Individual Scripts/windows service disabler v2.ps1 b/Individual Scripts/windows service disabler v2.ps1 index 0e906d64..900a9a45 100644 --- a/Individual Scripts/windows service disabler v2.ps1 +++ b/Individual Scripts/windows service disabler v2.ps1 @@ -99,21 +99,21 @@ foreach ($service in $services) { } #stop service this stop the services -Get-Service diagnosticshub.standardcollector.service | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service DiagTrack | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service dmwappushservice | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service diagnosticshub.standardcollector.service | Where {$_.status –eq 'running'} | Stop-Service +Get-Service DiagTrack | Where {$_.status –eq 'running'} | Stop-Service +Get-Service dmwappushservice | Where {$_.status –eq 'running'} | Stop-Service Get-Service lfsvc | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service MapsBroker | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service NetTcpPortSharing | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service RemoteAccess | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service RemoteRegistry | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service TrkWk | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service WbioSrvc | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service WlanSvc | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service WMPNetworkSvc | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service wscsvc | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service WSearch | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service XblAuthManager | Where {$_.status –eq 'Stopped'} | Stop-Service +Get-Service MapsBroker | Where {$_.status –eq 'running'} | Stop-Service +Get-Service NetTcpPortSharing | Where {$_.status –eq 'running'} | Stop-Service +Get-Service RemoteAccess | Where {$_.status –eq 'running'} | Stop-Service +Get-Service RemoteRegistry | Where {$_.status –eq 'running'} | Stop-Service +Get-Service TrkWk | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WbioSrvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WlanSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WMPNetworkSvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service wscsvc | Where {$_.status –eq 'running'} | Stop-Service +Get-Service WSearch | Where {$_.status –eq 'running'} | Stop-Service +Get-Service XblAuthManager | Where {$_.status –eq 'running'} | Stop-Service Get-Service XblGameSave | Where {$_.status –eq 'running'} | Stop-Service Get-Service XboxNetApiSvc | Where {$_.status –eq 'running'} | Stop-Service Get-Service XboxGipSvc | Where {$_.status –eq 'running'} | Stop-Service From 64531eb3fdbb5ef77c902a4ff06504ec5bb6f29b Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Tue, 6 Jul 2021 21:03:54 -0400 Subject: [PATCH 8/9] Update windows service disabler v2.ps1 --- Individual Scripts/windows service disabler v2.ps1 | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Individual Scripts/windows service disabler v2.ps1 b/Individual Scripts/windows service disabler v2.ps1 index 900a9a45..1ce77f8b 100644 --- a/Individual Scripts/windows service disabler v2.ps1 +++ b/Individual Scripts/windows service disabler v2.ps1 @@ -32,7 +32,6 @@ $services = @( "stisvc" #Disables Windows Image Acquisition (WIA) "AJRouter" #Disables (needed for AllJoyn Router Service) "MSDTC" # Disables Distributed Transaction Coordinator - "dmwappushservice" #Device Management Wireless Application Protocol (WAP) Push message Routing Service "WpcMonSvc" #Disables Parental Controls "PhoneSvc" #Disables Phone Service(Manages the telephony state on the device) "PrintNotify" #Disables Windows printer notifications and extentions @@ -49,24 +48,22 @@ $services = @( #"BFE" #Disables Base Filtering Engine (BFE) (is a service that manages firewall and Internet Protocol security) #"BrokerInfrastructure" #Disables Windows infrastructure service that controls which background tasks can run on the system. "SCardSvr" #Disables Windows smart card - "lfsvc" #Disable Windows geolocation service it can be use to track you "EntAppSvc" #Disables enterprise application management. "BthAvctpSvc" #Disables AVCTP service (if you use Bluetooth Audio Device or Wireless Headphones. then don't disable this) #"FrameServer" #Disables Windows Camera Frame Server(this allows multiple clients to access video frames from camera devices.) "Browser" #Disables computer browser "BthAvctpSvc" #AVCTP service (This is Audio Video Control Transport Protocol service.) "BDESVC" #Disables bitlocker - "fhsvc" # Disables File History Service (Protects user files from accidental loss by copying them to a backup location.) "iphlpsvc" #Disables ipv6 but most websites don't use ipv6 they use ipv4 "edgeupdate" # Disables one of edge update service "MicrosoftEdgeElevationService" # Disables one of edge service "edgeupdatem" # disbales another one of update service (disables edgeupdatem) "SEMgrSvc" #Disables Payments and NFC/SE Manager (Manages payments and Near Field Communication (NFC) based secure elements) - #"PNRPsvc" # Disables peer Name Resolution Protocol ( some peer-to-peer and collaborative applications, such as Remote Assistance, may not function, Discord will still work) + #"PNRPsvc" # Disables peer Name Resolution Protocol ( some peer-to-peer and collaborative applications, such as Remote Assistance, may not function, Discord will still work) #"p2psvc" # Disbales Peer Name Resolution Protocol(nables multi-party communication using Peer-to-Peer Grouping. If disabled, some applications, such as HomeGroup, may not function. Discord will still work) #"p2pimsvc" # Disables Peer Networking Identity Manager (Peer-to-Peer Grouping services may not function, and some applications, such as HomeGroup and Remote Assistance, may not function correctly.Discord will still work) "PerfHost" #Disables remote users and 64-bit processes to query performance . - "BcastDVRUserService_48486de" #Disables GameDVR and Broadcast is used for Game Recordings and Live Broadcasts + "BcastDVRUserService_48486de" #Disables GameDVR and Broadcast is used for Game Recordings and Live Broadcasts "CaptureService_48486de" #Disables ptional screen capture functionality for applications that call the Windows.Graphics.Capture API. "cbdhsvc_48486de" #Disables cbdhsvc_48486de (clipboard service it disables) "BluetoothUserService_48486de" #disbales BluetoothUserService_48486de (The Bluetooth user service supports proper functionality of Bluetooth features relevant to each user session.) @@ -74,7 +71,7 @@ $services = @( #"StorSvc" #Disables StorSvc (usb external hard drive will not be reconised by windows) "RtkBtManServ" #Disables Realtek Bluetooth Device Manager Service "QWAVE" #Disables Quality Windows Audio Video Experience (audio and video might sound worse) - #hp services + #Hp services "HPAppHelperCap" "HPDiagsCap" "HPNetworkCap" @@ -127,7 +124,6 @@ Get-Service gupdatem | Where {$_.status –eq 'running'} | Stop-Service Get-Service stisvc | Where {$_.status –eq 'running'} | Stop-Service Get-Service AJRouter | Where {$_.status –eq 'running'} | Stop-Service Get-Service MSDTC | Where {$_.status –eq 'running'} | Stop-Service -Get-Service dmwappushservice | Where {$_.status –eq 'running'} | Stop-Service Get-Service WpcMonSvc | Where {$_.status –eq 'running'} | Stop-Service Get-Service PhoneSvc | Where {$_.status –eq 'running'} | Stop-Service Get-Service PrintNotify | Where {$_.status –eq 'running'} | Stop-Service @@ -144,7 +140,6 @@ Get-Service ALG | Where {$_.status –eq 'running'} | Stop-Service #Get-Service BFE | Where {$_.status –eq 'running'} | Stop-Service Get-Service BrokerInfrastructure | Where {$_.status –eq 'running'} | Stop-Service Get-Service SCardSvr | Where {$_.status –eq 'running'} | Stop-Service -Get-Service lfsvc | Where {$_.status –eq 'running'} | Stop-Service Get-Service EntAppSvc | Where {$_.status –eq 'running'} | Stop-Service Get-Service BthAvctpSvc | Where {$_.status –eq 'running'} | Stop-Service Get-Service BDESVC | Where {$_.status –eq 'running'} | Stop-Service From ef36ad66506eaf6b845826d13cba7173eb759181 Mon Sep 17 00:00:00 2001 From: Brandon <74426342+Brandonbr1@users.noreply.github.com> Date: Fri, 9 Jul 2021 14:05:23 -0700 Subject: [PATCH 9/9] Update windows service disabler v2.ps1 --- .../windows service disabler v2.ps1 | 91 ++----------------- 1 file changed, 10 insertions(+), 81 deletions(-) diff --git a/Individual Scripts/windows service disabler v2.ps1 b/Individual Scripts/windows service disabler v2.ps1 index 1ce77f8b..3ea9ee41 100644 --- a/Individual Scripts/windows service disabler v2.ps1 +++ b/Individual Scripts/windows service disabler v2.ps1 @@ -91,85 +91,14 @@ $services = @( ) foreach ($service in $services) { - Write-Output "Trying to disable $service" - Get-Service -Name $service | Set-Service -StartupType Disabled -} + # -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist + + Write-Host "Setting $service StartupType to disabled" + Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled -#stop service this stop the services -Get-Service diagnosticshub.standardcollector.service | Where {$_.status –eq 'running'} | Stop-Service -Get-Service DiagTrack | Where {$_.status –eq 'running'} | Stop-Service -Get-Service dmwappushservice | Where {$_.status –eq 'running'} | Stop-Service -Get-Service lfsvc | Where {$_.status –eq 'Stopped'} | Stop-Service -Get-Service MapsBroker | Where {$_.status –eq 'running'} | Stop-Service -Get-Service NetTcpPortSharing | Where {$_.status –eq 'running'} | Stop-Service -Get-Service RemoteAccess | Where {$_.status –eq 'running'} | Stop-Service -Get-Service RemoteRegistry | Where {$_.status –eq 'running'} | Stop-Service -Get-Service TrkWk | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WbioSrvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WlanSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WMPNetworkSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service wscsvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WSearch | Where {$_.status –eq 'running'} | Stop-Service -Get-Service XblAuthManager | Where {$_.status –eq 'running'} | Stop-Service -Get-Service XblGameSave | Where {$_.status –eq 'running'} | Stop-Service -Get-Service XboxNetApiSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service XboxGipSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service ndu | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WerSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service Spooler | Where {$_.status –eq 'running'} | Stop-Service -Get-Service Fax | Where {$_.status –eq 'running'} | Stop-Service -Get-Service fhsvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service gupdate | Where {$_.status –eq 'running'} | Stop-Service -Get-Service gupdatem | Where {$_.status –eq 'running'} | Stop-Service -Get-Service stisvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service AJRouter | Where {$_.status –eq 'running'} | Stop-Service -Get-Service MSDTC | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WpcMonSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service PhoneSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service PrintNotify | Where {$_.status –eq 'running'} | Stop-Service -Get-Service PcaSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WPDBusEnum | Where {$_.status –eq 'running'} | Stop-Service -Get-Service LicenseManager | Where {$_.status –eq 'running'} | Stop-Service -Get-Service seclogon | Where {$_.status –eq 'running'} | Stop-Service -Get-Service SysMain | Where {$_.status –eq 'running'} | Stop-Service -Get-Service lmhosts | Where {$_.status –eq 'running'} | Stop-Service -Get-Service wisvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service FontCache | Where {$_.status –eq 'running'} | Stop-Service -Get-Service RetailDemo | Where {$_.status –eq 'running'} | Stop-Service -Get-Service ALG | Where {$_.status –eq 'running'} | Stop-Service -#Get-Service BFE | Where {$_.status –eq 'running'} | Stop-Service -Get-Service BrokerInfrastructure | Where {$_.status –eq 'running'} | Stop-Service -Get-Service SCardSvr | Where {$_.status –eq 'running'} | Stop-Service -Get-Service EntAppSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service BthAvctpSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service BDESVC | Where {$_.status –eq 'running'} | Stop-Service -Get-Service iphlpsvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service edgeupdate | Where {$_.status –eq 'running'} | Stop-Service -Get-Service MicrosoftEdgeElevationService | Where {$_.status –eq 'running'} | Stop-Service -Get-Service edgeupdatem | Where {$_.status –eq 'running'} | Stop-Service -Get-Service SEMgrSvc | Where {$_.status –eq 'running'} | Stop-Service -#Get-Service PNRPsvc | Where {$_.status –eq 'running'} | Stop-Service -#Get-Service p2psvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service p2pimsvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service PerfHost | Where {$_.status –eq 'running'} | Stop-Service -Get-Service BcastDVRUserService_48486de | Where {$_.status –eq 'running'} | Stop-Service -Get-Service CaptureService_48486de | Where {$_.status –eq 'running'} | Stop-Service -Get-Service cbdhsvc_48486de | Where {$_.status –eq 'running'} | Stop-Service -Get-Service BluetoothUserService_48486de | Where {$_.status –eq 'running'} | Stop-Service -Get-Service WpnService | Where {$_.status –eq 'running'} | Stop-Service -Get-Service StorSvc | Where {$_.status –eq 'running'} | Stop-Service -Get-Service QWAVE | Where {$_.status –eq 'running'} | Stop-Service -Get-Service RtkBtManServ | Where {$_.status –eq 'running'} | Stop-Service -Get-Service HPAppHelperCap | Where {$_.status –eq 'running'} | Stop-Service -Get-Service HPDiagsCap | Where {$_.status –eq 'running'} | Stop-Service -Get-Service HPNetworkCap | Where {$_.status –eq 'running'} | Stop-Service -Get-Service HPSysInfoCap | Where {$_.status –eq 'running'} | Stop-Service -Get-Service HpTouchpointAnalyticsService | Where {$_.status –eq 'running'} | Stop-Service -Get-Service HvHost | Where {$_.status –eq 'running'} | Stop-Service -Get-Service vmickvpexchange | Where {$_.status –eq 'running'} | Stop-Service -Get-Service vmicguestinterface | Where {$_.status –eq 'running'} | Stop-Service -Get-Service vmicshutdown | Where {$_.status –eq 'running'} | Stop-Service -Get-Service vmicheartbeat | Where {$_.status –eq 'running'} | Stop-Service -Get-Service vmicvmsession | Where {$_.status –eq 'running'} | Stop-Service -Get-Service vmicrdv | Where {$_.status –eq 'running'} | Stop-Service -Get-Service vmictimesync | Where {$_.status –eq 'running'} | Stop-Service + $running = Get-Service -Name $service -ErrorAction SilentlyContinue | Where-Object {$_.Status -eq 'Running'} + if ($running) { + Write-Host "Stopping $service" + Stop-Service -Name $service + } +}