Get-AzManagementGroupDeploymentWhatIfResult
管理グループ スコープでのデプロイの結果 What-If テンプレートを取得します。
構文
ByTemplateFileWithNoParameters (既定)
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateFile <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateObjectAndParameterObject
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterObject <Hashtable>
-TemplateObject <Hashtable>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateFileAndParameterObject
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterObject <Hashtable>
-TemplateFile <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateUriAndParameterObject
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterObject <Hashtable>
-TemplateUri <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateSpecResourceIdAndParamsObject
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterObject <Hashtable>
-TemplateSpecId <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateObjectAndParameterFile
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterFile <String>
-TemplateObject <Hashtable>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateFileAndParameterFile
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterFile <String>
-TemplateFile <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateUriAndParameterFile
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterFile <String>
-TemplateUri <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateSpecResourceIdAndParams
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterFile <String>
-TemplateSpecId <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByParameterFileWithNoTemplate
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterFile <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateObjectAndParameterUri
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterUri <String>
-TemplateObject <Hashtable>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateFileAndParameterUri
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterUri <String>
-TemplateFile <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateUriAndParameterUri
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterUri <String>
-TemplateUri <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateSpecResourceIdAndParamsUri
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateParameterUri <String>
-TemplateSpecId <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateObjectWithNoParameters
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateObject <Hashtable>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateUriWithNoParameters
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateUri <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByTemplateSpecResourceId
Get-AzManagementGroupDeploymentWhatIfResult
-ManagementGroupId <String>
-Location <String>
-TemplateSpecId <String>
[-Name <String>]
[-ResultFormat <WhatIfResultFormat>]
[-ExcludeChangeType <String[]>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
説明
Get-AzManagementGroupDeploymentWhatIfResult コマンドレットは、指定された管理グループ スコープでのテンプレートデプロイの ARM テンプレート What-If 結果を取得します。 実際のリソースに変更を加えずにデプロイが適用された場合に更新されるリソースを示す変更の一覧が返されます。 返される結果の形式を指定するには、 ResultFormat パラメーターを使用します。
例
例 1: 管理グループスコープで What-If 結果を取得する
Get-AzManagementGroupDeploymentWhatIfResult `
-DeploymentName "deploy-01" `
-Location "West US" `
-ManagementGroupId "myManagementGroup" `
-TemplateFile "D:\Azure\Templates\ServiceTemplate.json" `
-TemplateParameterFile "D:\Azure\Templates\ServiceParameters.json" `
-ResultFormat "FullResourcePayloads"
このコマンドは、カスタム テンプレート ファイルとディスク上のパラメーター ファイルを使用して、管理グループ スコープで What-If 結果を取得します。
このコマンドでは 、Location パラメーターを使用して、デプロイ データを格納する場所を指定します。
このコマンドでは、 ManagementGroupId パラメーターを使用して、テンプレートをデプロイする管理グループを指定します。
このコマンドでは、 TemplateFile パラメーターを使用してテンプレート ファイルを指定します。
このコマンドでは、 TemplateParameterFile パラメーターを使用してテンプレート パラメーター ファイルを指定します。
このコマンドでは 、ResultFormat パラメーターを使用して、完全なリソース ペイロードを含むように What-If 結果を設定します。
例 2: ResourceIdOnly を使用して管理グループ スコープで What-If 結果を取得する
Get-AzManagementGroupDeploymentWhatIfResult `
-DeploymentName "deploy-01" `
-Location "West US" `
-ManagementGroupId "myManagementGroup" `
-TemplateFile "D:\Azure\Templates\ServiceTemplate.json" `
-TemplateParameterFile "D:\Azure\Templates\ServiceParameters.json" `
-ResultFormat "ResourceIdOnly"
このコマンドは、カスタム テンプレート ファイルとディスク上のパラメーター ファイルを使用して、管理グループ スコープで What-If 結果を取得します。
このコマンドでは 、Location パラメーターを使用して、デプロイ データを格納する場所を指定します。
このコマンドでは、 ManagementGroupId パラメーターを使用して、テンプレートをデプロイする管理グループを指定します。
このコマンドでは、 TemplateFile パラメーターを使用してテンプレート ファイルを指定します。
このコマンドでは、 TemplateParameterFile パラメーターを使用してテンプレート パラメーター ファイルを指定します。
このコマンドは ResultFormat パラメーターを使用して、リソース ID のみを含む What-If 結果を設定します。
例 3: .bicepparam ファイルを使用して What-If を計算する
Get-AzManagementGroupDeploymentWhatIfResult -ManagementGroupId "myManagementGroup" -Location "West US" -TemplateParameterFile "./parameters.bicepparam"
このコマンドは、ディスク上の .bicepparam ファイルを使用して、管理グループ スコープで What-If 結果を取得します。
このコマンドでは、 TemplateParameterFile パラメーターを使用して .bicepparam ファイルを指定します。
パラメーター
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
パラメーターのプロパティ
型: IAzureContextContainer
規定値: None
ワイルドカードのサポート: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-ExcludeChangeType
結果から除外するリソース変更の種類のコンマ区切りの一覧 What-If。
パラメーターのプロパティ
型: String [ ]
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-Location
デプロイ データを格納する場所。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
(All)
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-ManagementGroupId
管理グループ ID。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
(All)
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-Name
作成するデプロイの名前。
指定しない場合は、テンプレート ファイルが指定されたときに既定でテンプレート ファイル名が使用されます。は、テンプレート オブジェクトが指定された現在の時刻 (例: "20131223140835") に既定で設定されます。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
Aliases: デプロイメント名
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-Pre
設定すると、使用するバージョンを自動的に決定するときに、コマンドレットでプレリリース API バージョンを使用する必要があることを示します。
パラメーターのプロパティ
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
What-If 結果の形式。
型: WhatIfResultFormat
規定値: None
指定可能な値: ResourceIdOnly, FullResourcePayloads
ワイルドカードのサポート: False
DontShow: False
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-SkipTemplateParameterPrompt
指定されたテンプレート パラメーターに、テンプレートで使用される必要なすべてのパラメーターが含まれているかどうかを確認する PowerShell 動的パラメーター処理をスキップします。
このチェックでは、不足しているパラメーターの値を指定するようにユーザーに求められますが、-SkipTemplateParameterPrompt を指定すると、このプロンプトは無視され、パラメーターがテンプレートにバインドされていないことが見つかった場合は直ちにエラーが表示されます。
非対話型スクリプトの場合は、すべての必須パラメーターが満たされていない場合に、より適切なエラー メッセージを提供する -SkipTemplateParameterPrompt を提供できます。
パラメーターのプロパティ
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
-TemplateFile
テンプレート ファイルへのローカル パス。 サポートされているテンプレート ファイルの種類: json と bicep。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
ByTemplateFileWithNoParameters
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateFileAndParameterObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateFileAndParameterFile
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateFileAndParameterUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-TemplateObject
テンプレートを表すハッシュ テーブル。
パラメーターのプロパティ
型: Hashtable
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
ByTemplateObjectAndParameterObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateObjectAndParameterFile
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateObjectAndParameterUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateObjectWithNoParameters
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-TemplateParameterFile
テンプレートに使用するパラメーター ファイル。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
ByTemplateObjectAndParameterFile
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateFileAndParameterFile
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateUriAndParameterFile
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateSpecResourceIdAndParams
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByParameterFileWithNoTemplate
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-TemplateParameterObject
パラメーターを表すハッシュ テーブル。
パラメーターのプロパティ
型: Hashtable
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
ByTemplateObjectAndParameterObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateFileAndParameterObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateUriAndParameterObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateSpecResourceIdAndParamsObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-TemplateParameterUri
テンプレート パラメーター ファイルへの URI。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
ByTemplateObjectAndParameterUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateFileAndParameterUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateUriAndParameterUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateSpecResourceIdAndParamsUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-TemplateSpecId
デプロイする templateSpec のリソース ID。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
ByTemplateSpecResourceIdAndParamsObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateSpecResourceIdAndParams
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateSpecResourceIdAndParamsUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateSpecResourceId
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-TemplateUri
テンプレート ファイルの URI。
パラメーターのプロパティ
型: String
規定値: None
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
ByTemplateUriAndParameterObject
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateUriAndParameterFile
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateUriAndParameterUri
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
ByTemplateUriWithNoParameters
配置: Named
必須: True
パイプラインからの値: False
プロパティ名別のパイプラインからの値: True
残りの引数からの値: False
-ValidationLevel
validate/what-if の検証レベルを設定します。 ValidationLevel には、Template(Skips provider validation)、Provider(Performs full validation)、ProviderNoRbac(Performs full validation using RBAC read checks instead of RBAC write checks for provider validation) を指定できます。
パラメーターのプロパティ
型: String
規定値: None(Provider)
ワイルドカードのサポート: False
DontShow: False
パラメーター セット
(All)
配置: Named
必須: False
パイプラインからの値: False
プロパティ名別のパイプラインからの値: False
残りの引数からの値: False
CommonParameters
このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParameters を参照してください。
出力