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

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DeploymentScriptObject

The deployment script PowerShell object.

Type:Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsDeploymentScript
Aliases:DeploymentScriptInputObject
Position:0
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-Name

The name of the deployment script.

Type:String
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ResourceGroupName

The name of the resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Tail

Limit output to last n lines

Type:Int32
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsDeploymentScript

Outputs

Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PsDeploymentScriptLog