Get-AzDeploymentScript
Gets or lists deployment scripts.
Syntax
ListDeploymentScript (Default)
Get-AzDeploymentScript
[[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetDeploymentScriptByName
Get-AzDeploymentScript
[-ResourceGroupName] <String>
[-Name] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetDeploymentScriptByResourceId
Get-AzDeploymentScript
[-Id] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzDeploymentScript cmdlet gets a single deployment script or a list of deployment scripts.
Examples
Example 1
Get-AzDeploymentScript
Lists deployment scripts in the subscription in current user's context.
Example 2
Get-AzDeploymentScript -ResourceGroupName DS-TestRg
Lists deployment scripts in resource group DS-TestRg.
Example 3
Get-AzDeploymentScript -Name MyDeploymentScript -ResourceGroupName DS-TestRg
Gets a deployment script with the name MyDeploymentScript in resource group DS-TestRG.
Example 4
Get-AzDeploymentScript -Id "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Resources/deploymentScripts/{deploymentScriptName}"
Gets a deployment script with the given resource Id.
Parameters
-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 |
-Id
The fully qualified resource Id of the deployment script. Example: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Resources/deploymentScripts/{deploymentScriptName}
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ResourceId |
Parameter sets
GetDeploymentScriptByResourceId
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Name
The name of the deployment script
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
GetDeploymentScriptByName
| Position: | 1 |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-ResourceGroupName
The name of the resource group.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ListDeploymentScript
| Position: | 0 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| 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.