Jump to content

Excluded monitored services


eDecisions

Recommended Posts

I'll circle back and create an array and loop thru the array later, but this should give you an idea where its heading, this script will remove any current excluded items so be carefull, and it will turn off monitoring on just the ones in the script, I use this to reset all clients to the same set of excluded services, the array will be nice to have all the excluded services listed at the top of the script.

 

 

 

Remove-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\"  -Recurse
New-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\"

 

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Count' -value '11'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service0' -value 'gpsvc'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service1' -value 'ITmanager.net'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service2' -value 'clr_optimization_v4.0.30319_64'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service3' -value 'clr_optimization_v4.0.30319_32'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service4' -value 'ClickToRunSvc'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service5' -value 'sppsvc'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service6' -value 'SSUService'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service7' -value 'wuauserv'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service8' -value 'BITS'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service9' -value 'gupdate'

Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service10' -value 'TrustedInstaller'

Edited by eDecisions
cut paste did not work
Link to comment
Share on other sites

Got done faster than I thougth

Revised script, just list the services in the top and it will auto account and add the count and service number for you, just keep adding $exclude += "servicename"

 

# 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 += 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 comment
Share on other sites

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