Edit

Share via


Clear-AzSqlServerVulnerabilityAssessmentSetting

Clears the vulnerability assessment settings of a server.

Syntax

ClearByNameParameterSet (Default)

Clear-AzSqlServerVulnerabilityAssessmentSetting
    [-ResourceGroupName] <String>
    [-ServerName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ClearByParentResourceParameterSet

Clear-AzSqlServerVulnerabilityAssessmentSetting
    [-InputObject] <AzureSqlServerModel>
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Clear-AzSqlServerVulnerabilityAssessmentSetting cmdlet removes 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: Clear the vulnerability assessment settings of an Azure SQL server

Clear-AzSqlServerVulnerabilityAssessmentSetting `
            -ResourceGroupName "ResourceGroup01" `
            -ServerName "Server01"

Example 2: Clear the vulnerability assessment settings from a server object

Get-AzSqlServer `
            -ResourceGroupName "ResourceGroup01" `
            -ServerName "Server01" `
            | Clear-AzSqlServerVulnerabilityAssessmentSetting

Parameters

-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

-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 server object to clear Vulnerability Assessment settings for

Parameter properties

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

Parameter sets

ClearByParentResourceParameterSet
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

ClearByNameParameterSet
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

ClearByNameParameterSet
Position:1
Mandatory:True
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.

Inputs

String

AzureSqlServerModel

Outputs

ServerVulnerabilityAssessmentSettingsModel