New-AzAlertsSuppressionRuleScope
Helper cmdlet to create PSIScopeElement.
Syntax
Default (Default)
New-AzAlertsSuppressionRuleScope
-Field <String>
[-ContainsSubstring <String>]
[-AnyOf <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Helper cmdlet to create PSIScopeElement. Usable in Set-AzAlertsSuppressionRule as part of the -AllOf parameter.
Examples
Example 1
$scope1 = New-AzAlertsSuppressionRuleScope -Field "entities.account.name" -ContainsSubstring "Example"
Creates a PSScopeElementContains.
Example 2
$scope2 = New-AzAlertsSuppressionRuleScope -Field "entities.file.name" -AnyOf "FileName1","FileName2","FileName3"
Creates a PSScopeElementIn.
Parameters
-AnyOf
Suppress only when field equals one of those values.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ContainsSubstring
Suppress only when field contains this specific value.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Field
Entity field to scope by.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.