Test-AzManagementGroupDeployment
Validates a deployment at a management group.
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateFile <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterObject <Hashtable>
-TemplateObject <Hashtable>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterObject <Hashtable>
-TemplateFile <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterObject <Hashtable>
-TemplateUri <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterObject <Hashtable>
-TemplateSpecId <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterFile <String>
-TemplateObject <Hashtable>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterFile <String>
-TemplateFile <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterFile <String>
-TemplateUri <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterFile <String>
-TemplateSpecId <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterFile <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterUri <String>
-TemplateObject <Hashtable>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterUri <String>
-TemplateFile <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterUri <String>
-TemplateUri <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateParameterUri <String>
-TemplateSpecId <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateObject <Hashtable>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateUri <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzManagementGroupDeployment
[-Name <String>]
-ManagementGroupId <String>
-Location <String>
[-QueryString <String>]
-TemplateSpecId <String>
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
The Test-AzManagementGroupDeployment cmdlet determines whether a deployment template and its parameter values are valid at a management group.
Test-AzManagementGroupDeployment -ManagementGroupId "myMG" -Location "West US" -TemplateFile "D:\Azure\Templates\OrgSetup.json" -TemplateParameterFile "D:\Azure\Templates\OrgParms.json"
This command tests a deployment at the management group "myMG" using the given template file and parameters file.
$TemplateFileText = [System.IO.File]::ReadAllText("D:\Azure\Templates\OrgSetup.json")
$TemplateObject = ConvertFrom-Json $TemplateFileText -AsHashtable
Test-AzManagementGroupDeployment -ManagementGroupId "myMG" -Location "West US" -TemplateObject $TemplateObject -TemplateParameterFile "D:\Azure\Templates\EngSiteParams.json"
This command tests a deployment at the management group "myMG" using the an in-memory hashtable created from the given template file and a parameter file.
Test-AzManagementGroupDeployment -ManagementGroupId "myManagementGroup" -Location "West US" -TemplateParameterFile "./parameters.bicepparam"
This command validates the deployment at the management group scope by using a .bicepparam file on disk. The command uses the TemplateParameterFile parameter to specify a .bicepparam file.
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 |
The location to store deployment data.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The management group id.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The name of the deployment it's going to test. If not specified, defaults to the template file name when a template file is provided
Type: | String |
Aliases: | DeploymentName |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The query string (for example, a SAS token) to be used with the TemplateUri parameter. Would be used in case of linked templates
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Skips the PowerShell dynamic parameter processing that checks if the provided template parameter contains all necessary parameters used by the template. This check would prompt the user to provide a value for the missing parameters, but providing the -SkipTemplateParameterPrompt will ignore this prompt and error out immediately if a parameter was found not to be bound in the template. For non-interactive scripts, -SkipTemplateParameterPrompt can be provided to provide a better error message in the case where not all required parameters are satisfied.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Local path to the template file. Supported template file type: json and bicep.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
A hash table which represents the template.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Parameter file to use for the template.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
A hash table which represents the parameters.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Uri to the template parameter file.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Resource ID of the templateSpec to be deployed.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Uri to the template file.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Azure PowerShell feedback
Azure PowerShell er et åben kildekode projekt. Vælg et link for at give feedback: