< Back
Register-MonCheck
Post
NAME Register-MonCheck
SYNOPSIS
Register the logic used to scan a target for a given point of information.
SYNTAX
Register-MonCheck [-Name] <String> [-Check] <ScriptBlock> [-Tag] <String[]> [[-Description] <String>] [[-Module]
<String>] [[-RecommendedLimit] <Object>] [[-RecommendedLimitOperator] {GreaterThan | GreaterEqual | Equal |
NotEqual | LessEqual | LessThan | Like | NotLike | Match | NotMatch}] [<CommonParameters>]
DESCRIPTION
Register a scriptblock that will be used to gather a piece of information from the target.
This scriptblock will receive two arguments:
- The name of the target
- A hashtable of connections (as registered using Register-MonConnection and applied to the target by its
Capability property)
PARAMETERS
-Name <String>
The name of the check to register.
Must be unique or it will overwrite the other check.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Check <ScriptBlock>
The logic to execute.
This scriptblock will receive two arguments:
- The name of the target
- A hashtable of connections (as registered using Register-MonConnection and applied to the target by its
Capability property)
Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Tag <String[]>
The tags this check applies to.
Tags are arbitrary labels that group monitoring targets.
A target has one or more tags, and all checks with a matching tag are applied to the target.
Required? true
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Description <String>
Adds a description to the check, explaining what this check does and requires.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Module <String>
The Management Pack Module that introduced the check.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecommendedLimit <Object>
Adds a recommended limit to the check.
This is intended to offer the opportunity to give a sane default setting.
Caveat:
Under no circumstances is this an assumption that this limit is a good fit for every environment.
Consider this a starting point if you are unsure, what your actual limits should be like.
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecommendedLimitOperator
The operator to apply to the recommended limit.
See the caveat on the parameter help for RecommendedLimit.
Required? false
Position? 7
Default value LessThan
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Register-MonCheck -Name 'NTDS_DB_FreeDiskPercent' -Check $checkScript -Tag 'dc' -Description 'Returns the
percent of free space on the disk hosting the NTDS Database.'
Registers the logic stored in the $checkScript variable under the name 'NTDS_DB_FreeDiskPercent' and assigns it to
the 'dc' label.
RELATED LINKS
SYNOPSIS
Register the logic used to scan a target for a given point of information.
SYNTAX
Register-MonCheck [-Name] <String> [-Check] <ScriptBlock> [-Tag] <String[]> [[-Description] <String>] [[-Module]
<String>] [[-RecommendedLimit] <Object>] [[-RecommendedLimitOperator] {GreaterThan | GreaterEqual | Equal |
NotEqual | LessEqual | LessThan | Like | NotLike | Match | NotMatch}] [<CommonParameters>]
DESCRIPTION
Register a scriptblock that will be used to gather a piece of information from the target.
This scriptblock will receive two arguments:
- The name of the target
- A hashtable of connections (as registered using Register-MonConnection and applied to the target by its
Capability property)
PARAMETERS
-Name <String>
The name of the check to register.
Must be unique or it will overwrite the other check.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Check <ScriptBlock>
The logic to execute.
This scriptblock will receive two arguments:
- The name of the target
- A hashtable of connections (as registered using Register-MonConnection and applied to the target by its
Capability property)
Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Tag <String[]>
The tags this check applies to.
Tags are arbitrary labels that group monitoring targets.
A target has one or more tags, and all checks with a matching tag are applied to the target.
Required? true
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Description <String>
Adds a description to the check, explaining what this check does and requires.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Module <String>
The Management Pack Module that introduced the check.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecommendedLimit <Object>
Adds a recommended limit to the check.
This is intended to offer the opportunity to give a sane default setting.
Caveat:
Under no circumstances is this an assumption that this limit is a good fit for every environment.
Consider this a starting point if you are unsure, what your actual limits should be like.
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecommendedLimitOperator
The operator to apply to the recommended limit.
See the caveat on the parameter help for RecommendedLimit.
Required? false
Position? 7
Default value LessThan
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Register-MonCheck -Name 'NTDS_DB_FreeDiskPercent' -Check $checkScript -Tag 'dc' -Description 'Returns the
percent of free space on the disk hosting the NTDS Database.'
Registers the logic stored in the $checkScript variable under the name 'NTDS_DB_FreeDiskPercent' and assigns it to
the 'dc' label.
RELATED LINKS