Get-AzDeploymentScriptLog
Gets the log of a deployment script execution.
Syntax
GetDeploymentScriptLogByName (Default)
Get-AzDeploymentScriptLog
[-ResourceGroupName] <String>
[-Name] <String>
[[-Tail] <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetDeploymentScriptLogByResourceId
Get-AzDeploymentScriptLog
[-DeploymentScriptResourceId] <String>
[[-Tail] <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetDeploymentScriptLogByInputObject
Get-AzDeploymentScriptLog
[-DeploymentScriptObject] <PsDeploymentScript>
[[-Tail] <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzDeploymentScriptLog cmdlet gets the log of a deployment script execution.
Examples
Example 1
Get-AzDeploymentScriptLog -Name MyDeploymentScript -ResourceGroupName DS-TestRg
Gets the log of a deployment script with the name MyDeploymentScript in resource group DS-TestRG.
Example 2
Get-AzDeploymentScriptLog -Name MyDeploymentScript -ResourceGroupName DS-TestRg -Tail 3
Gets the last 3 lines of the log of a deployment script with the name MyDeploymentScript in resource group DS-TestRG.
Example 3
$ds = Get-AzDeploymentScript -Name MyDeploymentScript -ResourceGroupName DS-TestRg
Get-AzDeploymentScriptLog -DeploymentScriptInputObject $ds
The first command gets a deployment script with the name MyDeploymentScript in resource group DS-TestRG. The second command gets the log of given deployment script.
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 |
-DeploymentScriptObject
The deployment script PowerShell object.
Parameter properties
Type: | PsDeploymentScript |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DeploymentScriptInputObject |
Parameter sets
GetDeploymentScriptLogByInputObject
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DeploymentScriptResourceId
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 |
Parameter sets
GetDeploymentScriptLogByResourceId
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
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
GetDeploymentScriptLogByName
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
GetDeploymentScriptLogByName
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Tail
Limit output to last n lines
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
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.