Say you are using a Template service, like the Service Monitoring Template. As you know the discovery interval is 60 sec.
After a year a so you understand that you have 100 discovery’s with 60 sec interval each. Not a good idea right ?
So you have two options, the easy and the long hard annoying one.
The long way:
- Export every MP
- Change in every XML what you want
- Load back to SCOM.
Easy PowerShell way:
$ManagementGroup = get-scommanagementgroup
$Discovery = $ManagementGroup.GetMonitorDiscovery(“9d029a5b-da8b-6090-4cb9-e442b5c13f2c”)
$Discovery.DataSource.Configuration = “Your change“
$PendingUpdateState = [Microsoft.EnterpriseManagement.Configuration.ManagementPackElementStatus]::PendingUpdate
$Discovery.Status = $PendingUpdateState
GetMonitorDiscovery – you can change any over type like GetMonitor for monitors
“9d029a5b-da8b-6090-4cb9-e442b5c13f2c” – get the id from PowerShell or write a loop that gets the ids with commands like get-scomdiscovery
“Your change” – in the Configuration you can see the original XML code with lots of information, in my case I just replaced a string of <Frequency>60</Frequency> to <Frequency>1800</Frequency> with $Discovery.DataSource.Configuration = $Discovery.DataSource.Configuration.Replace(<Frequency>60</Frequency>,<Frequency>1800</Frequency>)
Simple and easy way to update Unsealed Management Packs