Jump to content

Patrick

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Patrick

  1. 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.

×
×
  • Create New...