共用方式為


Start-AzSynapseSqlPoolVulnerabilityAssessmentScan

啟動弱點評估掃描。

語法

Start-AzSynapseSqlPoolVulnerabilityAssessmentScan
     [-SqlPoolObject <PSSynapseSqlPool>]
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzSynapseSqlPoolVulnerabilityAssessmentScan
     [-ResourceGroupName <String>]
     -WorkspaceName <String>
     -Name <String>
     [-ScanId <String>]
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

Start-AzSynapseSqlPoolVulnerabilityAssessmentScan Cmdlet 會觸發具有 ScanId 識別符的掃描。 掃描結果將會儲存在 Update-AzSynapseSqlPoolVulnerabilityAssessmentSetting Cmdlet 所定義的記憶體底下,在 scans/{WorkspaceName}/{Name}/scan_{ScanId}.json 您可以使用 get-AzSynapseSqlPoolVulnerabilityAssessmentScanRecord Cmdlet,並查看 State returned 參數來監視掃描進度。 請注意,您必須執行 Enable-AzSynapseSqlAdvancedThreatProtectionUpdate-AzSynapseSqlPoolVulnerabilityAssessmentSetting Cmdlet 作為使用此 Cmdlet 的必要條件。

範例

範例 1:啟動弱點評估掃描

Start-AzSynapseSqlPoolVulnerabilityAssessmentScan `
            -ResourceGroupName "ResourceGroup01" `
            -WorkspaceName "WorkspaceName01" `
            -Name "Name01" `
            -ScanId "myScan"

ResourceGroupName            : ResourceGroup01
WorkspaceName                : WorkspaceName01
Name                         : Name01
ScanId                       : myScan
TriggerType                  : OnDemand
State                        : Fail
StartTime                    : 6/11/2018 1:57:27 PM
EndTime                      : 6/11/2018 1:57:31 PM
Error                        : {}
ScanResultsLocationPath      : https://myaccount.blob.core.windows.net/vulnerability-assessment
                                scans/WorkspaceName01/Name01/scan_myScan.json
NumberOfFailedSecurityChecks : 9

範例 2:在沒有特定掃描標識符的情況下啟動弱點評估掃描

Start-AzSynapseSqlPoolVulnerabilityAssessmentScan `
            -ResourceGroupName "ResourceGroup01" `
            -WorkspaceName "WorkspaceName01" `
            -Name "Name01"

ResourceGroupName            : ResourceGroup01
WorkspaceName                : WorkspaceName01
Name                         : Name01
ScanId                       : 20180611_135726
TriggerType                  : OnDemand
State                        : Fail
StartTime                    : 6/11/2018 1:57:27 PM
EndTime                      : 6/11/2018 1:57:31 PM
Errors                       : {}
ScanResultsLocationPath      : https://myaccount.blob.core.windows.net/vulnerability-assessment
                                scans/WorkspaceName01/Name01/scan_myScan.json
NumberOfFailedSecurityChecks : 9

此命令會從 UTC 日期時間產生格式為 「yyyyMMdd_HHmmss」 的掃描識別碼。

範例 3:在背景啟動弱點評估掃描

$scanJob = Start-AzSynapseSqlPoolVulnerabilityAssessmentScan `
            -ResourceGroupName "ResourceGroup01" `
            -WorkspaceName "WorkspaceName01" `
            -Name "Name01" `
            -ScanId "myScan" `
            -AsJob
$scanJob | Wait-Job
$scanJob | Receive-Job

ResourceGroupName            : ResourceGroup01
WorkspaceName                : WorkspaceName01
Name                         : Name01
ScanId                       : myScan
TriggerType                  : OnDemand
State                        : Fail
StartTime                    : 6/11/2018 1:57:27 PM
EndTime                      : 6/11/2018 1:57:31 PM
Errors                       : {}
ScanResultsLocationPath      : https://myaccount.blob.core.windows.net/vulnerability-assessment
                                scans/WorkspaceName01/Name01/scan_myScan.json
NumberOfFailedSecurityChecks : 9

範例 4:使用受控 SQL 集區對象啟動弱點評估掃描

Get-AzSynapseSqlPool `
            -ResourceGroupName "ResourceGroup01" `
            -WorkspaceName "WorkspaceName01" `
            -Name "Name01" `
            | Start-AzSynapseSqlPoolVulnerabilityAssessmentScan

ResourceGroupName            : ResourceGroup01
WorkspaceName                : WorkspaceName01
Name                         : Name01
ScanId                       : 20180611_135726
TriggerType                  : OnDemand
State                        : Fail
StartTime                    : 6/11/2018 1:57:27 PM
EndTime                      : 6/11/2018 1:57:31 PM
Errors                       : {}
ScanResultsLocationPath      : https://myaccount.blob.core.windows.net/vulnerability-assessment
                                scans/WorkspaceName01/Name01/scan_myScan.json
NumberOfFailedSecurityChecks : 9

範例 5:在受控實例下的所有資料庫上啟動弱點評估掃描

Get-AzSynapseSqlPool `
            -ResourceGroupName "ResourceGroup01" `
            -WorkspaceName "WorkspaceName01" `
            | Where-Object {$_.Name -ne "master"}  `
            | Start-AzSynapseSqlPoolVulnerabilityAssessmentScan

ResourceGroupName            : ResourceGroup01
WorkspaceName                : WorkspaceName01
Name                         : Name01
ScanId                       : 20180611_135726
TriggerType                  : OnDemand
State                        : Fail
StartTime                    : 6/11/2018 1:57:27 PM
EndTime                      : 6/11/2018 1:57:31 PM
Errors                       : {}
ScanResultsLocationPath      : https://myaccount.blob.core.windows.net/vulnerability-assessment
                                scans/WorkspaceName01/Name01/scan_myScan.json
NumberOfFailedSecurityChecks : 9


ResourceGroupName            : ResourceGroup01
WorkspaceName                : WorkspaceName01
Name                         : Name02
ScanId                       : 20180611_135726
TriggerType                  : OnDemand
State                        : Fail
StartTime                    : 6/11/2018 1:57:27 PM
EndTime                      : 6/11/2018 1:57:31 PM
Errors                       : {}
ScanResultsLocationPath      : https://myaccount.blob.core.windows.net/vulnerability-assessment
                                scans/WorkspaceName01/Name02/scan_myScan.json
NumberOfFailedSecurityChecks : 9

參數

-AsJob

在背景執行 Cmdlet

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

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

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

-DefaultProfile

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

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

-Name

Synapse SQL 集區的名稱。

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

-ResourceGroupName

資源群組的名稱。

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

-ScanId

指定掃描標識碼。

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

-SqlPoolObject

要取得弱點評估掃描記錄的 sql 集區物件

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

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

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

-WorkspaceName

Synapse 工作區的名稱。

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

輸入

輸出

Microsoft.Azure.Commands.Synapse.Models.PSSynapseSqlPool.PSVulnerabilityAssessmentScanRecordModel