Jump to content

Disable Services monitoring for specific Services


Recommended Posts

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.

Link to post
Share on other sites
  • 2 years later...

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"

 

 

 

Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...
  • Administrators

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

Link to post
Share on other sites
  • 3 months later...
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 ;)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Jason Corlett
      Can anyone find the new in 8.5 feature "Network Monitoring" or know how to add a device?
    • By Canadian Dental Services
      Hi all,
      I recently did a clean upgrade to Windows 10 on 2 WKSTs previously running Windows 7 with Pulseway installed.  I am now at a loss as to how to re-add these units to my Pulseway instance.
      I see they are still showing up in the “Deployment Successful” tab under “Discovery & Deployment”.
      Is there a way to re-add these units without manually installing the Pulseway app on these WKSTs?
    • By RingTailedLemur7
      Hello, I have a question about the Pulseway app. When the pc is on all of the commands work great and are perfect for managing the pc. But I am attempting to turn on my pc when I am away from my home and then be able to fully control it like I was there. The issue is how the wake up command from sleep or from powered down will not work even when on my home network. How can I fix this. Also a side question, is there a way I would be able to see a live view of the screen or does it only allow screenshots of the screen. Thanks
    • By DQuiram
      We reinstalled Pulseway on a re-imaged system and after the install we noticed issues. In the patch mgmt section, the status was "assign failed" in red. We rebooted the system and then the service was not starting. We checked the service, it was set to start automatically and in the event log it was generating this error: "Service cannot be started.  The handle is invalid"  We removed the system from Pulseway, uninstalled, and reinstalled. Service is starting normally, but still getting the same issue of the patch policy failing to assign. I tried moving the system to another group that did not have a patch policy at all and got the same result. 
    • By Brant
      I've implemented a script that retrieves and stores the Windows Build Version number to a custom field in the system overview.   It works fine on MOST systems.  However, there are a small number systems that are unable to run the script.  The error message displayed includes: Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
      I used the "Insert Output Variable Code" in the script and verified that it includes the inserted text "Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable  .....".
      For some reason, a few systems do not seem to have the environment variable PWY_HOME set.
      It appears that these systems are using the Enable PowerShell User Impersonation option under Pulseway Manger > Settings > Runtime.
      What is the easiest way to make sure that all of my systems have the PWY_HOME variable set so that any future scripts will not fail because of a missing environment variable?
      Thanks,
      Brant
×
×
  • Create New...