Edit

Get-AzSecuritySqlVulnerabilityAssessmentScanResult

Gets the scan results of a single rule in a scan record.

Syntax

ResourceId (Default)

Get-AzSecuritySqlVulnerabilityAssessmentScanResult
    -ResourceId <String>
    -WorkspaceId <String>
    -Server <String>
    -Database <String>
    [-ScanId <String>]
    [-RuleId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

OnPremMachines

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

Description

Gets the scan results of a single rule in a scan record.

Examples

Example 1: Get the result of a specific rule from a scan

Get-AzSecuritySqlVulnerabilityAssessmentScanResult -ResourceId "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Compute/virtualMachines/myVm" -WorkspaceId "ba7c9d0e-a6e3-4997-b575-cf7a18a98a49" -Server myServer -Database db -ScanId "Scheduled-20200623" -RuleId "VA1234"
Name   Status
----   ------
VA1234 Passed

Gets the result of rule VA1234 from the scan identified by Scheduled-20200623.

Example 2: List all rule results for a scan

Get-AzSecuritySqlVulnerabilityAssessmentScanResult -ResourceId "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Compute/virtualMachines/myVm" -WorkspaceId "ba7c9d0e-a6e3-4997-b575-cf7a18a98a49" -Server myServer -Database db -ScanId "Scheduled-20200623"
Name   Status
----   ------
VA1234 Passed
VA1235 Failed

Lists the results of all rules evaluated during the scan identified by Scheduled-20200623.

Parameters

-AgentId

Agent ID - on premise parameter

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

OnPremMachines
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

Computer full name - on premise parameter

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

OnPremMachines
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Database

Database name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

ID of the security resource that you want to invoke the command on. Supported resources are:

  • ARC: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.HybridCompute/machines/{machineName}
  • VM: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{machineName}
  • On-Premise: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.operationalinsights/workspaces/{workspaceName}/onPremiseMachines/{machineName}

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RuleId

The rule Id of the results.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ScanId

Vulnerability assessment scan ID - use scanId = 'latest' to get latest results

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Server

Server name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VmUuid

Virtual machine universal unique identifier - on premise parameter

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

OnPremMachines
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WorkspaceId

Workspace ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WorkspaceResourceId

Workspace resource ID - on premise parameter

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

OnPremMachines
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

PSSqlVulnerabilityAssessmentScanResult