Get-AzDeploymentScriptLog

デプロイ スクリプト実行のログを取得します。

構文

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>]

説明

Get-AzDeploymentScriptLog コマンドレットは、デプロイ スクリプトの実行のログを取得します。

例 1

Get-AzDeploymentScriptLog -Name MyDeploymentScript -ResourceGroupName DS-TestRg

リソース グループ DS-TestRG の MyDeploymentScript という名前のデプロイ スクリプトのログを取得します。

例 2

Get-AzDeploymentScriptLog -Name MyDeploymentScript -ResourceGroupName DS-TestRg -Tail 3

リソース グループ DS-TestRG の MyDeploymentScript という名前のデプロイ スクリプトのログの最後の 3 行を取得します。

例 3

$ds = Get-AzDeploymentScript -Name MyDeploymentScript -ResourceGroupName DS-TestRg
Get-AzDeploymentScriptLog -DeploymentScriptInputObject $ds

最初のコマンドは、リソース グループ DS-TestRG の MyDeploymentScript という名前のデプロイ スクリプトを取得します。 2 番目のコマンドは、指定されたデプロイ スクリプトのログを取得します。

パラメーター

-DefaultProfile

Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeploymentScriptObject

デプロイ スクリプト PowerShell オブジェクト。

Type:PsDeploymentScript
Aliases:DeploymentScriptInputObject
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DeploymentScriptResourceId

デプロイ スクリプトの完全修飾リソース ID。 例: /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

デプロイ スクリプトの名前。

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

-ResourceGroupName

リソース グループの名前。

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

-Tail

出力を最後の n 行に制限する

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

入力

String

PsDeploymentScript

出力

PsDeploymentScriptLog