Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan
脆弱性評価スキャンを開始します。
警告
AzureRM PowerShell モジュールは、2024 年 2 月 29 日の時点で正式に非推奨になりました。 引き続きサポートを受け、更新を受け取れるようにするために、AzureRM から Az PowerShell モジュールに移行することをお勧めします。
AzureRM モジュールは引き続き機能する可能性がありますが、メインが維持またはサポートされなくなり、ユーザーの判断とリスクで引き続き使用できます。 Az モジュールへの移行に関するガイダンスについては、移行リソースを参照してください。
構文
Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan
[-InputObject <AzureSqlDatabaseModel>]
[-AsJob]
[-ScanId <String>]
[-ServerName] <String>
[-DatabaseName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan コマンドレットは、ScanId 識別子を使用してスキャンをトリガーします。 スキャン結果は、Set-AzureRmSqlDatabaseVulnerabilityAssessment設定 コマンドレットによって定義されたストレージの下に、scans/{ServerName}/{DatabaseName}/scan_{ScanId}.json ScanId パラメーターを指定して Get-AzureRmSqlDatabaseVulnerabilityAssesssmentScanRecord コマンドレットを使用してスキャンの進行状況を監視し、返された状態パラメーターを確認できます。 このコマンドレットを使用するための前提条件として、Enable-AzureRmSqlServerAdvancedThreatProtection コマンドレットと Set-AzureRmSqlDatabaseVulnerabilityAssessment設定 コマンドレットを実行する必要があることに注意してください。
例
例 1 - 脆弱性評価スキャンを開始する
PS C:\> Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01" `
-ScanId "myScan"
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
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/Server01/Database01/scan_myScan.json
NumberOfFailedSecurityChecks : 9
例 2 - 特定のスキャン ID なしで脆弱性評価スキャンを開始する
PS C:\> Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
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/Server01/Database01/scan_myScan.json
NumberOfFailedSecurityChecks : 9
このコマンドは、UTC 日時から "yyyyMMdd_HHmmss" の形式でスキャン ID を生成します。
例 3 - バックグラウンドで脆弱性評価スキャンを開始する
PS C:\> Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01" `
-ScanId "myScan" `
-AsJob
PS C:\> $scanJob | Wait-Job
PS C:\> $scanJob | Receive-Job
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
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/Server01/Database01/scan_myScan.json
NumberOfFailedSecurityChecks : 9
例 4 - データベース オブジェクトを使用して脆弱性評価スキャンを開始する
PS C:\> Get-AzureRmSqlDatabase `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01" `
| Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
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/Server01/Database01/scan_myScan.json
NumberOfFailedSecurityChecks : 9
例 5 - サーバーの下にあるすべてのデータベースで脆弱性評価スキャンを開始する
PS C:\> Get-AzureRmSqlDatabase `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
| where {$_.DatabaseName -ne "master"} `
| Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
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/Server01/Database01/scan_myScan.json
NumberOfFailedSecurityChecks : 9
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database02
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/Server01/Database01/scan_myScan.json
NumberOfFailedSecurityChecks : 9
パラメーター
-AsJob
バックグラウンドでコマンドレットを実行する
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
コマンドレットの実行前に確認を求めるメッセージが表示されます。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseName
SQL Database 名。
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 Database サーバー名。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
コマンドレットの実行時に発生する内容を示します。 このコマンドレットは実行されません。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
入力
Parameters: InputObject (ByValue)