New MPToolFilteredRegistryDiscovery - AndreasSobczyk/MPTool GitHub Wiki
#New-MPToolFilteredRegistryDiscovery This function will create a new registry discovery. Will also verify or add all need management pack references. Returns a object of [Microsoft.EnterpriseManagement.Configuration.ManagementPackElement]
###Parameters
- ManagementServerFQDN [string] – FQDN of the management server to connect.
Example - scom01.contoso.com - ManagementPackName [string] – Name of the management pack.
Example - "Contoso.Discovery" - DiscoveryName [string] – Name of the discovery.
Example - "Contoso.TimeService.Discovery" - DiscoveryDisplayName [string] – (Optional) Display name of the discovery
Example - "Contoso TimeService Discovery” - DiscoveryClassName [string] – Name of the class to discover. This is the class to discover
Example - "Contoso.TimeService" - TargetClassName [string] – Target class for the discovery to run on.
Example - "Microsoft.Windows.Computer" - TargetClassMPName [string] – (Optional) Name of the target class management pack.
Example - "Microsoft.Windows.Library" - TargetClassMPAlias [string] – (Optional) Alias of the target class management pack.
Example - "Windows" - RegistryPath [string] – The registry path to discover for.
Example – “SYSTEM\CurrentControlSet\Services\W32Time\” - IntervalSeconds [int] – Interval in seconds for the discovery to run.
Example - 86000 - Enabled – (Optional) If the discovery should be enabled - $true/$false – Default: $false.
###Example Creates a new registry Discovery called Contoso.Discovery for the class Contoso.TimeService. The discovery will run on all instances of the class "Microsoft.Windows.Computer" and discovery all the instances of the Contoso.TimeService on the Windows Computer server.
New-MPToolFilteredRegistryDiscovery -ManagementServerFQDN scom01.contoso.com `
-ManagementPackName "Contoso.Discovery" `
-DiscoveryName "Contoso.TimeService.Discovery" `
-DiscoveryDisplayName "Contoso TimeService Discovery" `
-DiscoveryClassName "Contoso.TimeService" `
-RegistryPath “SYSTEM\CurrentControlSet\Services\W32Time\” `
-TargetClassName "Microsoft.Windows.Computer" `
-IntervalSeconds 86000 `
-Enabled $true