你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord
获取与给定数据库关联的所有漏洞评估扫描记录。
警告
截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord
[-InputObject <AzureSqlDatabaseModel>]
[-ScanId <String>]
[-ServerName] <String>
[-DatabaseName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord cmdlet 检索与给定数据库关联的所有漏洞评估扫描记录。 请注意,需要运行 Enable-AzureRmSqlServerAdvancedThreatProtection 和 Set-AzureRmSqlDatabaseVulnerabilityAssessment设置 cmdlet 作为使用此 cmdlet 的先决条件。
示例
示例 1 - 获取扫描 ID 标识的特定漏洞评估扫描结果
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 - 获取由扫描 ID 与数据库对象标识的特定漏洞评估扫描结果
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
指定扫描 ID。
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)