Jump to content
Sign in to follow this  
eDecisions

Excluded monitored services

Recommended Posts

Posted (edited)

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

Share this post


Link to post
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"

Share this post


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.

Sign in to follow this  

×
×
  • Create New...