New-SqlVulnerabilityAssessmentBaselineSet

Creates a new instance of Microsoft.SQL.VulnerabilityAssessment.SecurityCheckBaselineSet.

Syntax

New-SqlVulnerabilityAssessmentBaselineSet
   [-Baselines <SecurityCheckBaseline[]>]
   [<CommonParameters>]

Description

The New-SqlVulnerabilityAssessmentBaselineSet cmdlet creates a new instance of Microsoft.SQL.VulnerabilityAssessment.BaselineSet.

A baseline set consists of a set of baselines (of type Microsoft.SQL.VulnerabilityAssessment.SecurityCheckBaseline). Each baseline defines the expected results of a specific security check. Grouped in a baseline set these baselines define the expected results for all security checks in a scan.

The baseline set can be created with 0 or more baselines.

The baseline set is used as an input of a scan to apply these baseline settings to its results.

Module requirements: version 21+ on PowerShell 5.1; version 22+ on PowerShell 7.x.

This cmdlet was removed in v22.3+ of the module.

Examples

Example 1: Create a baseline set with a list of baselines

PS C:\> $baseline1 = New-SqlVulnerabilityAssessmentBaseline -SecurityCheckId VA1234 -ExpectedResult $null
PS C:\> $baseline2 = New-SqlVulnerabilityAssessmentBaseline -SecurityCheckId VA1235 -ExpectedResult $null
PS C:\> $baselineSet = New-SqlVulnerabilityAssessmentBaselineSet -Baselines $baseline1, $baseline2

SecurityCheckBaselines
----------------------
{VA1234, VA1235}

This example creates two baselines and then creates a baseline set with them.

Parameters

-Baselines

A list of security check baselines. The baseline set will be initialized with this list.

Type:SecurityCheckBaseline[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

Microsoft.SqlServer.VulnerabilityAssessment.SecurityCheckBaseline[]

Outputs

System.Object