Add-AzSecuritySqlVulnerabilityAssessmentBaselineRule
Set a list of baseline rules.
Will overwrite any previously existing results (for all rules).
Syntax
AddExpanded (Default)
Add-AzSecuritySqlVulnerabilityAssessmentBaselineRule
-ResourceId <String>
[-DatabaseName <String>]
[-LatestScan]
[-Result <Hashtable>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add
Add-AzSecuritySqlVulnerabilityAssessmentBaselineRule
-ResourceId <String>
-Body <IRulesResultsInput>
[-DatabaseName <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
AddViaIdentityExpanded
Add-AzSecuritySqlVulnerabilityAssessmentBaselineRule
-InputObject <ISecurityIdentity>
[-DatabaseName <String>]
[-LatestScan]
[-Result <Hashtable>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
AddViaIdentity
Add-AzSecuritySqlVulnerabilityAssessmentBaselineRule
-InputObject <ISecurityIdentity>
-Body <IRulesResultsInput>
[-DatabaseName <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set a list of baseline rules.
Will overwrite any previously existing results (for all rules).
Examples
Example 1: Set baselines for multiple rules at once
$results = @{
"VA1234" = @(@(,@("userA","SELECT")), @(,@("userB","SELECT")))
"VA1235" = @(@(,@("userA","EXECUTE")))
}
Add-AzSecuritySqlVulnerabilityAssessmentBaselineRule -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db" -Result $results
Name Result
---- ------
VA1234 {{userA, SELECT}, {userB, SELECT}}
VA1235 {{userA, EXECUTE}}
Overwrites the baselines for the specified rules in a single call.
Any previously existing results for these rules are replaced.
Example 2: Set baselines for all rules using the latest scan results
Add-AzSecuritySqlVulnerabilityAssessmentBaselineRule -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db" -LatestScan
Name Result
---- ------
VA1234 {{userA, SELECT}, {userB, SELECT}}
VA1235 {{userA, EXECUTE}}
Sets the baselines for all rules by taking the results from the latest vulnerability assessment scan.
Parameters
-Body
Rules results input.
Parameter properties
Parameter sets
Add
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
AddViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DatabaseName
The name of the database to assess.
Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI.
This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.
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 DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: 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
Identity Parameter
AddViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
AddViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-LatestScan
Take results from latest scan.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
AddExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
AddViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The fully qualified Azure Resource manager identifier of the resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
AddExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Add
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Result
Expected results to be inserted into the baseline.Leave this field empty if latestScan == true.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
AddExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
AddViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
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 .
Outputs