Jump to content

Recommended Posts

Posted

When u use the built-in script "Add Automatically Started Services in Pulseway" some services wil be monitored that are triggert and not always on.

This wil result in unwanted notifications.

The first variable has the servicenames you want to disable.

$services = @('gupdate', 'ShellHWDetection', 'sppsvc', 'RemoteRegistry', 'MapsBroker', 'tiledatamodelsvc', 'WbioSrvc', 'WinDefend', 'CDPSvc')
$servicesRegex = [string]::Join('|', $services) # create the regex
$regservices = Get-ItemProperty "HKLM:\Software\MMSOFT Design\PC Monitor\Services"
$regservicesSplit = $regservices  -split ";"

foreach ($regservice in $regservicesSplit) {
	If ($regservice -match $servicesRegex ) {
		$servicesSplit = $regservice -split "="
		$servicesTrim = $servicesSplit[0]
		$servicesTrim = $servicesTrim.Trim()
        Remove-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\Services" -Name $servicesTrim
        Write-Host $regservice " Verwijderd"
	}
}

Hope it helps.

  • 2 years later...
Posted

Question, new here but if you removed the entry as you suggest does that not also remove it from services from the tech side, meaning that if I remove the service from pc monitor\services sure it won't send the notice but lets say I wanted to view services from the manager and restart one, will that service still be listed? I just checked, when clicking the SERVICES tab in the web app you only see auto start services listed, so you'd not be able to manage it without logging in, take a look at this option:

 

 

# Note, This script removes all current excluded services from Notifications and replaces with your selection.
# 
#
Remove-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\"  -Recurse
New-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\"

$exclude = @()
$exclude += 'gpsvc'
$exclude += 'ITmanager.net'
$exclude += 'clr_optimization_v4.0.30319_64'
$exclude += 'clr_optimization_v4.0.30319_32'
$exclude += 'ClickToRunSvc'
$exclude += 'sppsvc'
$exclude += 'SSUService'
$exclude += 'wuauserv'
$exclude += 'BITS'
$exclude += 'gupdate'
$exclude += 'TrustedInstaller'
$exclude += 'VSS'  # Volume Shadow Copy
$exclude += 'WUDO' # Service Host: Delivery Optimization

#
# $exclude += Just keep adding rows with new service name.
#


$i=0
foreach ($service in $exclude){
Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name Service$i -value $service
$i++ 
}
Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\'  -Name 'Count' -value "$i"

 

 

 

  • 1 month later...
Posted

Hay 1700+  views and not one comment, like hay good job, or I did that already do it this way, good or bad how about some chatter?

  • 2 weeks later...
  • Administrators
Posted

I'd like to point out that disabling Windows Update related services is a very BAD idea. We've seen cases on Windows Server 2016 where if you stop, disable the Windows Update service, then use the GUI to check for available updates, the windows update component will crash and corrupt the system in a way where dism and sfc couldn't repair. Just something to keep in mind.

-Paul

Posted

Was just an example, and note this script stops nothing, it only turns off monitoring of the service in question, but does nothing to stop it.

  • 3 months later...
Posted
On 5/16/2020 at 8:29 PM, eDecisions said:

Question, new here but if you removed the entry as you suggest does that not also remove it from services from the tech side, meaning that if I remove the service from pc monitor\services sure it won't send the notice but lets say I wanted to view services from the manager and restart one, will that service still be listed? I just checked, when clicking the SERVICES tab in the web app you only see auto start services listed, so you'd not be able to manage it without logging in, take a look at this option:

 

 

# Note, This script removes all current excluded services from Notifications and replaces with your selection.
# 
#
Remove-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\"  -Recurse
New-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\"

$exclude = @()
$exclude += 'gpsvc'
$exclude += 'ITmanager.net'
$exclude += 'clr_optimization_v4.0.30319_64'
$exclude += 'clr_optimization_v4.0.30319_32'
$exclude += 'ClickToRunSvc'
$exclude += 'sppsvc'
$exclude += 'SSUService'
$exclude += 'wuauserv'
$exclude += 'BITS'
$exclude += 'gupdate'
$exclude += 'TrustedInstaller'
$exclude += 'VSS'  # Volume Shadow Copy
$exclude += 'WUDO' # Service Host: Delivery Optimization

#
# $exclude += Just keep adding rows with new service name.
#


$i=0
foreach ($service in $exclude){
Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name Service$i -value $service
$i++ 
}
Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\'  -Name 'Count' -value "$i"

 

 

 

This script is exactly what I was searching for, It keeps monitoring the services but disables the notifications.

Thanks a lot for sharing it ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...