Get-AzDeploymentScriptLog
Gets the log of a deployment script execution.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Get-AzDeploymentScriptLog
[-ResourceGroupName] <String>
[-Name] <String>
[[-Tail] <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzDeploymentScriptLog
[-DeploymentScriptResourceId] <String>
[[-Tail] <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
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
PS C:\> 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
PS C:\> 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
PS C:\> $ds = Get-AzDeploymentScript -Name MyDeploymentScript -ResourceGroupName DS-TestRg
PS C:\> 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
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The deployment script PowerShell object.
| Type: | PsDeploymentScript |
| Aliases: | DeploymentScriptInputObject |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The fully qualified resource Id of the deployment script. Example: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Resources/deploymentScripts/{deploymentScriptName}
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the deployment script.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The name of the resource group.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Limit output to last n lines
| Type: | Int32 |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |