Enable-SCOMDiscovery
Updated: September 10, 2012
Applies To: System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager
Enable-SCOMDiscovery
Syntax
Parameter Set: Empty Enable-SCOMDiscovery [-ManagementPack] <ManagementPack> [-Discovery] <ManagementPackDiscovery[]> [[-Enforce]] [[-PassThru]] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: FromGroup Enable-SCOMDiscovery [[-Group] <MonitoringObject[]> ] [-ManagementPack] <ManagementPack> [-Discovery] <ManagementPackDiscovery[]> [[-Enforce]] [[-PassThru]] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: FromInstance Enable-SCOMDiscovery [[-Instance] <MonitoringObject[]> ] [-ManagementPack] <ManagementPack> [-Discovery] <ManagementPackDiscovery[]> [[-Enforce]] [[-PassThru]] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: FromManagementPackClass Enable-SCOMDiscovery [-Class] <ManagementPackClass[]> [-ManagementPack] <ManagementPack> [-Discovery] <ManagementPackDiscovery[]> [[-Enforce]] [[-PassThru]] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Enable-Discovery cmdlet enables discoveries by creating and saving overrides for the specified discoveries.
Parameters
-Class<ManagementPackClass[]>
Specifies one or more class objects for which the discoveries will be enabled. Enter a variable that represents the classes, or type a command that gets the classes. For information about how to get a class object, type Get-Help Get-SCOMClass.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-Discovery<ManagementPackDiscovery[]>
Specifies one or more discovery objects. Enter a variable that represents the discoveries, or type a command that gets the discoveries.
For information about how to get a discovery object, type Get-Help Get-SCOMDiscovery.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
2 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-Enforce
Indicates that the enforce property will be set to True on the override that is created to enable the specified discoveries.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
3 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-Group<MonitoringObject[]>
Specifies one or more group objects for which the discoveries will be enabled. Enter a variable that represents the groups, or type a command that gets the groups.For information about how to get a group object, type Get-Help Get-SCOMGroup.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-Instance<MonitoringObject[]>
Specifies one or more class instance objects for which the discoveries will be enabled. Enter a variable that represents the class instances, or type a command that gets the class instances. This parameter also accepts group objects.For information about how to get a class instance object, type Get-Help Get-SCOMClassInstance.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-ManagementPack<ManagementPack>
Specifies one or more management pack objects into which the enabling override will be saved. If the discovery is contained in an unsealed management pack, the overrides must be saved into the same management pack. Enter a variable that represents the management packs, or type a command that gets the management packs.For information about how to get a management pack object, type Get-Help Get-SCOMManagementPack.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-PassThru
Returns an object representing the discovery. By default, this cmdlet does not generate any output.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
4 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before executing the command.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
false |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
false |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
-------------------------- EXAMPLE 1 --------------------------
Description
-----------
The first three commands get a management pack object, a class object, and a discovery object, and then store the objects in the $MP, $Class, and $Discovery variables, respectively.
The fourth command enables the discovery stored in $Discovery for the management pack stored in $MP using the Enforce property.
PS C:\>$MP = Get-SCOMManagementPack -displayname "My SQL MP Customization" | where {$_.Sealed -eq $False}PS C:\>$Class = Get-SCOMClass -DisplayName "SQL DB Engine"PS C:\>$Discovery = Get-SCOMDiscovery -DisplayName *rule*PS C:\>Enable-SCOMDiscovery -Class $Class -Discovery $Discovery -ManagementPack $MP -Enforce
Related topics
Get-SCOMClass
Get-SCOMClassInstance
Get-SCOMDiscovery
Get-SCOMGroup
Get-SCOMManagementPack
Disable-SCOMDiscovery
