다음을 통해 공유


Get-AzSecuritySqlVulnerabilityAssessmentScanRecord

SQL 취약성 평가 검사 요약을 가져옵니다.

구문

Get-AzSecuritySqlVulnerabilityAssessmentScanRecord
   [-ScanId <String>]
   -ResourceId <String>
   -WorkspaceId <String>
   -Server <String>
   -Database <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzSecuritySqlVulnerabilityAssessmentScanRecord
   [-ScanId <String>]
   -WorkspaceId <String>
   -Server <String>
   -Database <String>
   -ComputerName <String>
   -VmUuid <String>
   -AgentId <String>
   -WorkspaceResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

SQL 취약성 평가 검사 요약을 가져옵니다.

예제

예제 1: SQL Database에 대한 최신 검사에 대한 검사 요약을 가져옵니다.

Get-AzSecuritySqlVulnerabilityAssessmentScanRecord -WorkspaceResourceId /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace -ComputerName ahabas-dev01.middleeast.corp.microsoft.com -AgentId 49640166-652f-4ee6-b48b-cfb840b8afe2 -VmUuid 4c4c4544-0030-4b10-8039-b8c04f4a3332 -WorkspaceId  ba7c9d0e-a6e3-4997-b575-cf7a18a98a49 -Server AHABASDEV01SRV -Database master -ScanId "latest"

TriggerType                    : Recurring
State                          : Failed
Server                         : AHABASDEV01SRV
Database                       : master
SqlVersion                     : 14.0.1000.169
StartTime                      : 3/17/2021 1:11:10 AM
EndTime                        : 12/31/9999 9:59:59 PM
HighSeverityFailedRulesCount   : 9
MediumSeverityFailedRulesCount : 2
LowSeverityFailedRulesCount    : 5
TotalPassedRulesCount          : 43
TotalFailedRulesCount          : 16
TotalRulesCount                : 59
IsBaselineApplied              : True
Id                             : /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onpremisemachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/
                                 sqlServers/AHABASDEV01SRV/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/bdbdf860-5d58-464b-ad9a-0125af63c162
Name                           : bdbdf860-5d58-464b-ad9a-0125af63c162
Type                           : Microsoft.Security/sqlVulnerabilityAssessments/scans

스캔 ID = "latest"를 사용하는 예제입니다.

예제 2: SQL Database의 모든 검사 요약을 가져옵니다.

Get-AzSecuritySqlVulnerabilityAssessmentScanRecord -WorkspaceResourceId /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace -ComputerName ahabas-dev01.middleeast.corp.microsoft.com -AgentId 49640166-652f-4ee6-b48b-cfb840b8afe2 -VmUuid 4c4c4544-0030-4b10-8039-b8c04f4a3332 -WorkspaceId  ba7c9d0e-a6e3-4997-b575-cf7a18a98a49 -Server AHABASDEV01SRV -Database master

TriggerType                    : Recurring
State                          : Failed
Server                         : AHABASDEV01SRV
Database                       : master
SqlVersion                     : 14.0.1000.169
StartTime                      : 3/17/2021 1:11:10 AM
EndTime                        : 12/31/9999 9:59:59 PM
HighSeverityFailedRulesCount   : 9
MediumSeverityFailedRulesCount : 2
LowSeverityFailedRulesCount    : 5
TotalPassedRulesCount          : 43
TotalFailedRulesCount          : 16
TotalRulesCount                : 59
IsBaselineApplied              : True
Id                             : /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onpremisemachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/
                                 sqlServers/AHABASDEV01SRV/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/bdbdf860-5d58-464b-ad9a-0125af63c162
Name                           : bdbdf860-5d58-464b-ad9a-0125af63c162
Type                           : Microsoft.Security/sqlVulnerabilityAssessments/scans

TriggerType                    : Recurring
State                          : Failed
Server                         : AHABASDEV01SRV
Database                       : master
SqlVersion                     : 14.0.1000.169
StartTime                      : 3/17/2021 12:41:14 AM
EndTime                        : 3/17/2021 1:11:10 AM
HighSeverityFailedRulesCount   : 2
MediumSeverityFailedRulesCount : 0
LowSeverityFailedRulesCount    : 0
TotalPassedRulesCount          : 57
TotalFailedRulesCount          : 2
TotalRulesCount                : 59
IsBaselineApplied              : True
Id                             : /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onpremisemachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/
                                 sqlServers/AHABASDEV01SRV/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/8b2383c3-7c7e-4b6c-9b34-512ce99fd68a
Name                           : 8b2383c3-7c7e-4b6c-9b34-512ce99fd68a
Type                           : Microsoft.Security/sqlVulnerabilityAssessments/scans

TriggerType                    : Recurring
State                          : Passed
Server                         : AHABASDEV01SRV
Database                       : master
SqlVersion                     : 14.0.1000.169
StartTime                      : 2/14/2021 4:27:44 PM
EndTime                        : 3/17/2021 12:41:14 AM
HighSeverityFailedRulesCount   : 0
MediumSeverityFailedRulesCount : 0
LowSeverityFailedRulesCount    : 0
TotalPassedRulesCount          : 59
TotalFailedRulesCount          : 0
TotalRulesCount                : 59
IsBaselineApplied              : True
Id                             : /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onpremisemachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/
                                 sqlServers/AHABASDEV01SRV/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/6845790d-6463-4f45-96e8-76286edf0267
Name                           : 6845790d-6463-4f45-96e8-76286edf0267
Type                           : Microsoft.Security/sqlVulnerabilityAssessments/scans

TriggerType                    : Recurring
State                          : Failed
Server                         : AHABASDEV01SRV
Database                       : master
SqlVersion                     : 14.0.1000.169
StartTime                      : 2/14/2021 3:57:44 PM
EndTime                        : 2/14/2021 4:27:44 PM
HighSeverityFailedRulesCount   : 2
MediumSeverityFailedRulesCount : 0
LowSeverityFailedRulesCount    : 0
TotalPassedRulesCount          : 57
TotalFailedRulesCount          : 2
TotalRulesCount                : 59
IsBaselineApplied              : True
Id                             : /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onpremisemachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/
                                 sqlServers/AHABASDEV01SRV/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/2058a46e-cb5a-4a49-b28a-6576a540dd9d
Name                           : 2058a46e-cb5a-4a49-b28a-6576a540dd9d
Type                           : Microsoft.Security/sqlVulnerabilityAssessments/scans

검사 ID가 지정되지 않은 경우 모든 검사 레코드를 나열하는 예제입니다.

예제 3: 리소스 ID 매개 변수를 사용하여 검사 요약을 가져옵니다.

Get-AzSecuritySqlVulnerabilityAssessmentScanRecord -ResourceId /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onPremiseMachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332 -WorkspaceId  ba7c9d0e-a6e3-4997-b575-cf7a18a98a49 -Server AHABASDEV01SRV -Database master -ScanId 169a5f78-acff-4e05-b597-6252af7e6677

TriggerType                    : Recurring
State                          : Failed
Server                         : AHABASDEV01SRV
Database                       : master
SqlVersion                     : 14.0.1000.169
StartTime                      : 11/18/2020 1:10:34 AM
EndTime                        : 11/18/2020 1:40:20 AM
HighSeverityFailedRulesCount   : 9
MediumSeverityFailedRulesCount : 2
LowSeverityFailedRulesCount    : 5
TotalPassedRulesCount          : 43
TotalFailedRulesCount          : 16
TotalRulesCount                : 59
IsBaselineApplied              : True
Id                             : /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/provid
                                 ers/microsoft.operationalinsights/workspaces/ahabas-workspace/onpremisemachines/ahabas
                                 -dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-003
                                 0-4b10-8039-b8c04f4a3332/sqlServers/AHABASDEV01SRV/databases/master/providers/Microsof
                                 t.Security/sqlVulnerabilityAssessments/default/scans/169a5f78-acff-4e05-b597-6252af7e6
                                 677
Name                           : 169a5f78-acff-4e05-b597-6252af7e6677
Type                           : Microsoft.Security/sqlVulnerabilityAssessments/scans

Azure 리소스 ID 매개 변수를 사용하는 예제입니다. 지원되는 리소스는 다음과 같습니다.

  • ARC: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.HybridCompute/machines/{machineName}
  • VM: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{machineName}
  • 온-프레미스: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.operationalinsights/workspaces/{workspaceName}/onPremiseMachines/{machineName}

예제 4: 온-프레미스 매개 변수를 사용하여 검사 요약을 가져옵니다.

Get-AzSecuritySqlVulnerabilityAssessmentScanRecord -WorkspaceResourceId /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace -ComputerName ahabas-dev01.middleeast.corp.microsoft.com -AgentId 49640166-652f-4ee6-b48b-cfb840b8afe2 -VmUuid 4c4c4544-0030-4b10-8039-b8c04f4a3332 -WorkspaceId  ba7c9d0e-a6e3-4997-b575-cf7a18a98a49 -Server AHABASDEV01SRV -Database master -ScanId bdbdf860-5d58-464b-ad9a-0125af63c162

TriggerType                    : Recurring
State                          : Failed
Server                         : AHABASDEV01SRV
Database                       : master
SqlVersion                     : 14.0.1000.169
StartTime                      : 3/17/2021 1:11:10 AM
EndTime                        : 12/31/9999 9:59:59 PM
HighSeverityFailedRulesCount   : 9
MediumSeverityFailedRulesCount : 2
LowSeverityFailedRulesCount    : 5
TotalPassedRulesCount          : 43
TotalFailedRulesCount          : 16
TotalRulesCount                : 59
IsBaselineApplied              : True
Id                             : /subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onpremisemachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/
                                 sqlServers/AHABASDEV01SRV/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/bdbdf860-5d58-464b-ad9a-0125af63c162
Name                           : bdbdf860-5d58-464b-ad9a-0125af63c162
Type                           : Microsoft.Security/sqlVulnerabilityAssessments/scans

온-프레미스 매개 변수를 사용하는 예제입니다.

매개 변수

-AgentId

에이전트 ID - 온-프레미스 매개 변수

형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-ComputerName

컴퓨터 전체 이름 - 온-프레미스 매개 변수

형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-Database

데이터베이스 이름

형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-DefaultProfile

Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독입니다.

형식:IAzureContextContainer
별칭:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
필수:False
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-ResourceId

명령을 호출하려는 보안 리소스의 ID입니다. 지원되는 리소스는 다음과 같습니다.

  • ARC: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.HybridCompute/machines/{machineName}
  • VM: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{machineName}
  • 온-프레미스: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.operationalinsights/workspaces/{workspaceName}/onPremiseMachines/{machineName}
형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-ScanId

취약성 평가 검사 ID - scanId = 'latest'를 사용하여 최신 결과 가져오기

형식:String
Position:Named
Default value:None
필수:False
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-Server

서버 이름

형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-VmUuid

가상 머신 범용 고유 식별자 - 온-프레미스 매개 변수

형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-WorkspaceId

작업 영역 ID입니다.

형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

-WorkspaceResourceId

작업 영역 리소스 ID - 온-프레미스 매개 변수

형식:String
Position:Named
Default value:None
필수:True
파이프라인 입력 허용:False
와일드카드 문자 허용:False

입력

None

출력

PSSqlVulnerabilityAssessmentScanRecord