Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord
取得與指定資料庫相關聯的所有弱點評估掃描記錄。
警告
自 2024 年 2 月 29 日起,AzureRM PowerShell 模組已正式淘汰。 建議使用者從 AzureRM 遷移至 Az PowerShell 模組,以確保持續支援和更新。
雖然 AzureRM 模組可能仍可運作,但不再維護或支援它,但會根據用戶的判斷權和風險放置任何繼續使用。 如需轉換至 Az 模組的指引,請參閱我們的 移轉資源 。
Syntax
Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord
[-InputObject <AzureSqlDatabaseModel>]
[-ScanId <String>]
[-ServerName] <String>
[-DatabaseName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord Cmdlet 會擷取與指定資料庫相關聯的所有弱點評估掃描記錄。 請注意,您必須執行 Enable-AzureRmSqlServerAdvancedThreatProtection 和 Set-AzureRmSqlDatabaseVulnerabilityAssessment 設定 Cmdlet 作為使用此 Cmdlet 的必要條件。
範例
範例 1 - 取得掃描標識碼所識別的特定弱點評估掃描結果
PS C:\> Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01" `
-ScanId "myScan"
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
ScanId : myScan
TriggerType : OnDemand
State : Passed
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/Server01/Database01/scan_myScan/.json
NumberOfFailedSecurityChecks : 9
範例 2 - 使用資料庫物件取得掃描標識碼所識別的特定弱點評估掃描結果
PS C:\> Get-AzureRmSqlDatabase `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01" `
| Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord `
-ScanId "myScan"
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
ScanId : myScan
TriggerType : OnDemand
State : Passed
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/Server01/Database01/scan_myScan/.json
NumberOfFailedSecurityChecks : 9
範例 3 - 取得指定 databsae 上的所有弱點評估掃描結果
PS C:\> Get-AzureRmSqlDatabase `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01" `
| Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
ScanId : myScan
TriggerType : OnDemand
State : Passed
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/Server01/Database01/scan_myScan/.json
NumberOfFailedSecurityChecks : 9
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
ScanId : myScan1
TriggerType : OnDemand
State : Passed
StartTime : 6/12/2018 1:57:27 PM
EndTime : 6/12/2018 1:57:31 PM
Errors : {}
ScanResultsLocationPath : https://myaccount.blob.core.windows.net/vulnerability-assessment
scans/Server01/Database01/scan_myScan/.json
NumberOfFailedSecurityChecks : 9
參數
-DatabaseName
SQL 資料庫 名稱。
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
要取得弱點評估掃描記錄的資料庫物件
Type: | AzureSqlDatabaseModel |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
資源群組的名稱。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ScanId
指定掃描標識碼。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerName
SQL 資料庫 伺服器名稱。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
輸入
參數:InputObject (ByValue)