Get-AzDeploymentScriptLog
Gets the log of a deployment script execution.
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
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.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeploymentScriptObject
The deployment script PowerShell object.
Type: | PsDeploymentScript |
Aliases: | DeploymentScriptInputObject |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DeploymentScriptResourceId
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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The name of the deployment script.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tail
Limit output to last n lines
Type: | Int32 |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |