Invoke-AzSecurityInitiateSqlVulnerabilityAssessmentScan
Initiates a vulnerability assessment scan.
Syntax
Initiate (Default)
Invoke-AzSecurityInitiateSqlVulnerabilityAssessmentScan
-ResourceId <String>
[-DatabaseName <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
InitiateViaIdentity
Invoke-AzSecurityInitiateSqlVulnerabilityAssessmentScan
-InputObject <ISecurityIdentity>
[-DatabaseName <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Initiates a vulnerability assessment scan.
Examples
Example 1: Initiate a vulnerability assessment scan on a database
Invoke-AzSecurityInitiateSqlVulnerabilityAssessmentScan -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db"
Name ScanStatus
---- ----------
11111111-2222-3333-4444-555555555555 Passed
Initiates an on-demand SQL Vulnerability Assessment scan on the specified database and waits for it to complete.
Example 2: Initiate a vulnerability assessment scan on a system database using DatabaseName
Invoke-AzSecurityInitiateSqlVulnerabilityAssessmentScan -ResourceId "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer" -DatabaseName "master"
Name ScanStatus
---- ----------
22222222-3333-4444-5555-666666666666 Passed
Initiates a scan on the master system database of the server, which cannot be referenced directly in the resource URI.
Parameters
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
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
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
Identity Parameter
InitiateViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
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
-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
Initiate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
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 .
Outputs