Patrick
Members
-
Joined
-
Last visited
Reputation Activity
-
Patrick got a reaction from Andy Raybould in Disable Services monitoring for specific ServicesWhen 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.
-
Patrick got a reaction from Paul in Disable Services monitoring for specific ServicesWhen 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.