I want to apply "Approve as Baseline" in all my ID's[Like VA1258] using powershell, so that I do not have to do it manually.
Is there any way to do this.
Below screenshot attached. I want to enable "Approve as Baseline" using powershell.

You could use Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline in Powershell.
Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline
[-ServerName] <String>
[-DatabaseName] <String>
[-InputObject <VulnerabilityAssessmentRuleBaselineModel>]
-BaselineResult <String[][]>
-RuleId <String>
[-RuleAppliesToMaster]
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]

Note: BaselineResult shows bellow.

For more details, see here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With