Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to apply "Approve as Baseline" in Azure Vulnerability Assessment using Powershell

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.

enter image description here

like image 929
Baxy Avatar asked Jan 21 '26 20:01

Baxy


1 Answers

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>]

enter image description here

Note: BaselineResult shows bellow. enter image description here

For more details, see here.

like image 181
unknown Avatar answered Jan 23 '26 19:01

unknown