次の方法で共有


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 との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。

型:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
既定値:None
必須:False
Accept pipeline input:False
Accept wildcard characters:False

-DeploymentScriptObject

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

型:PsDeploymentScript
Aliases:DeploymentScriptInputObject
Position:0
既定値:None
必須:True
Accept pipeline input:True
Accept wildcard characters:False

-DeploymentScriptResourceId

デプロイ スクリプトの完全修飾リソース ID。 例: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Resources/deploymentScripts/{deploymentScriptName}

型:String
Position:0
既定値:None
必須:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

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

型:String
Position:1
既定値:None
必須:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

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

型:String
Position:0
既定値:None
必須:True
Accept pipeline input:True
Accept wildcard characters:False

-Tail

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

型:Int32
Position:2
既定値:None
必須:False
Accept pipeline input:False
Accept wildcard characters:False

入力

String

PsDeploymentScript

出力

PsDeploymentScriptLog