共用方式為


Update-AzSqlServerVulnerabilityAssessmentSetting

更新伺服器的弱點評估設定。

語法

Update-AzSqlServerVulnerabilityAssessmentSetting
      [-ResourceGroupName] <String>
      [-ServerName] <String>
      [-StorageAccountName <String>]
      [-ScanResultsContainerName <String>]
      [-RecurringScansInterval <RecurringScansInterval>]
      [-EmailAdmins <Boolean>]
      [-NotificationEmail <String[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzSqlServerVulnerabilityAssessmentSetting
      [-ResourceGroupName] <String>
      [-ServerName] <String>
      -BlobStorageSasUri <Uri>
      [-RecurringScansInterval <RecurringScansInterval>]
      [-EmailAdmins <Boolean>]
      [-NotificationEmail <String[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzSqlServerVulnerabilityAssessmentSetting
      -InputObject <VulnerabilityAssessmentSettingsModel>
      [-RecurringScansInterval <RecurringScansInterval>]
      [-EmailAdmins <Boolean>]
      [-NotificationEmail <String[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update-AzSqlServerVulnerabilityAssessmentSetting Cmdlet 會更新 Azure SQL Server 的弱點評估設定。 請注意,您必須執行 Enable-AzSqlServerAdvancedDataSecurity Cmdlet 作為使用此 Cmdlet 的必要條件。

範例

範例 1:使用記憶體帳戶名稱更新弱點評估設定

Update-AzSqlServerVulnerabilityAssessmentSetting `
            -ResourceGroupName "ResourceGroup01"`
            -ServerName "Server01"`
            -StorageAccountName "mystorage" `
            -ScanResultsContainerName "vulnerability-assessment" `
            -RecurringScansInterval Weekly `
            -EmailAdmins $true `
            -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

ResourceGroupName				: ResourceGroup01
ServerName			        	: Server01
StorageAccountName     			: mystorage
ScanResultsContainerName		: vulnerability-assessment
RecurringScansInterval			: Weekly
EmailAdmins	            		: True
NotificationEmail				: {mail1@mail.com , mail2@mail.com}

範例 2:使用 Blob 記憶體 SAS URI 更新弱點評量設定

Update-AzSqlServerVulnerabilityAssessmentSetting `
            -ResourceGroupName "ResourceGroup01"`
            -ServerName "Server01"`
            -BlobStorageSasUri "https://mystorage.blob.core.windows.net/vulnerability-assessment?st=XXXXXX" `
            -RecurringScansInterval Weekly `
            -EmailAdmins $true `
            -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

ResourceGroupName				: ResourceGroup01
ServerName			        	: Server01
StorageAccountName     			: mystorage
ScanResultsContainerName		: vulnerability-assessment
RecurringScansInterval			: Weekly
EmailAdmins	            		: True
NotificationEmail				: {mail1@mail.com , mail2@mail.com}

範例 3:從 ServerVulnerabilityAssessmentSettingsModel 實例定義更新弱點評量設定

Update-AzSqlServerVulnerabilityAssessmentSetting `
            -ResourceGroupName "ResourceGroup01"`
            -ServerName "Server01"`
            -StorageAccountName "mystorage" `
            -ScanResultsContainerName "vulnerability-assessment" `
            -RecurringScansInterval Weekly `
            -EmailAdmins $true `
            -NotificationEmail @("mail1@mail.com" , "mail2@mail.com")

Get-AzSqlServerVulnerabilityAssessmentSetting `
            -ResourceGroupName "ResourceGroup01" `
            -ServerName "Server01" `
            | Update-AzSqlServerVulnerabilityAssessmentSetting `
                -ResourceGroupName "ResourceGroup02" `
                -ServerName "Server02"

ResourceGroupName				: ResourceGroup02
ServerName			        	: Server02
StorageAccountName     			: mystorage
ScanResultsContainerName		: vulnerability-assessment
RecurringScansInterval			: Weekly
EmailAdmins		            	: True
NotificationEmail				: {mail1@mail.com , mail2@mail.com}

此命令已從 Server01 上的設定更新 Server02 上的弱點評量設定

參數

-BlobStorageSasUri

將保存掃描結果的記憶體容器 SAS URI。

類型:Uri
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EmailAdmins

值,指出是否要在週期性掃描完成時傳送電子郵件服務和共同管理員。

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-InputObject

要設定的弱點評量設定物件

類型:VulnerabilityAssessmentSettingsModel
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-NotificationEmail

在週期性掃描完成時要傳送的郵件地址清單。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-RecurringScansInterval

週期性掃描間隔。

類型:RecurringScansInterval
接受的值:None, Weekly
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

資源群組的名稱。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ScanResultsContainerName

將保存掃描結果的記憶體容器名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-ServerName

SQL 資料庫 伺服器名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-StorageAccountName

將保存掃描結果的記憶體帳戶名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

VulnerabilityAssessmentSettingsModel

Uri

RecurringScansInterval

Boolean

String[]

輸出

DatabaseVulnerabilityAssessmentSettingsModel