Edit

Share via


Get-AzSqlServerVulnerabilityAssessmentSetting

Gets the vulnerability assessment settings of a server.

Syntax

GetByNameParameterSet (Default)

Get-AzSqlServerVulnerabilityAssessmentSetting
    [-ResourceGroupName] <String>
    [-ServerName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetByParentResourceParameterSet

Get-AzSqlServerVulnerabilityAssessmentSetting
    [-InputObject] <AzureSqlServerModel>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzSqlServerVulnerabilityAssessmentSetting cmdlet gets the vulnerability assessment settings of an Azure SQL Server. Note that you need to run Enable-AzSqlServerAdvancedDataSecurity cmdlet as a prerequisite for using this cmdlet.

Examples

Example 1: Get the vulnerability assessment settings of an Azure SQL server

Get-AzSqlServerVulnerabilityAssessmentSetting `
            -ResourceGroupName "ResourceGroup01" `
            -ServerName "Server01"
ResourceGroupName				: ResourceGroup01
ServerName			        	: Server01
StorageAccountName     			: mystorage
ScanResultsContainerName		: vulnerability-assessment
RecurringScansInterval			: None
EmailSubscriptionAdmins			: False
NotificationEmail				: {}

Example 2: Get the vulnerability assessment settings of an Azure SQL server from an Azure SQL server object

Get-AzSqlServer `
          -ResourceGroupName "ResourceGroup01" `
          -ServerName "Server01" `
          | Get-AzSqlServerVulnerabilityAssessmentSetting
ResourceGroupName				: ResourceGroup01
ServerName			        	: Server01
StorageAccountName     			: mystorage
ScanResultsContainerName		: vulnerability-assessment
RecurringScansInterval			: None
EmailSubscriptionAdmins			: False
NotificationEmail				: {}

Parameters

-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

-InputObject

The database object to get Vulnerability Assessment settings for

Parameter properties

Type:AzureSqlServerModel
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetByParentResourceParameterSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetByNameParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerName

SQL Database server name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetByNameParameterSet
Position:1
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.

Inputs

String

AzureSqlServerModel

Outputs

ServerVulnerabilityAssessmentSettingsModel