Edit

Get-AzSecuritySqlVulnerabilityAssessmentScan

Gets the scan details of a single scan record.

Syntax

List (Default)

Get-AzSecuritySqlVulnerabilityAssessmentScan
    -ResourceId <String>
    [-DatabaseName <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzSecuritySqlVulnerabilityAssessmentScan
    -ResourceId <String>
    -ScanId <String>
    [-DatabaseName <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzSecuritySqlVulnerabilityAssessmentScan
    -InputObject <ISecurityIdentity>
    [-DatabaseName <String>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Gets the scan details of a single scan record.

Examples

Example 1: Get a specific vulnerability assessment scan

Get-AzSecuritySqlVulnerabilityAssessmentScan -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db" -ScanId "Scheduled-20200623"
Name                State  TotalRulesCount TotalPassedRulesCount TotalFailedRulesCount
----                -----  --------------- --------------------- ---------------------
Scheduled-20200623  Passed 18              18                    0

Gets the scan identified by Scheduled-20200623 on the specified database.

Example 2: List all vulnerability assessment scans for a resource

Get-AzSecuritySqlVulnerabilityAssessmentScan -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db"
Name                State  TotalRulesCount TotalPassedRulesCount TotalFailedRulesCount
----                -----  --------------- --------------------- ---------------------
Scheduled-20200623  Passed 18              18                    0
Scheduled-20200616  Passed 18              17                    1

Lists all vulnerability assessment scans that have run on the specified database.

Parameters

-DatabaseName

The name of the database to assess. Required when the API is called on the parent resource (e.g., server level) rather than on a specific database resource, since the database name is not part of the resource URI. This is the only way to assess system databases (e.g., master), which cannot be referenced directly in the resource URI.

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

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases: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

-InputObject

Identity Parameter

Parameter properties

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

Parameter sets

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

-ResourceId

The fully qualified Azure Resource manager identifier of the resource.

Parameter properties

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

Parameter sets

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

-ScanId

The scan Id. Type 'latest' to get the scan record for the latest scan.

Parameter properties

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

Parameter sets

Get
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

ISecurityIdentity

Outputs

IScanV2