Test-AzureRmResourceGroupDeployment

Validates a resource group deployment.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateFile <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateParameterObject <Hashtable>
    -TemplateFile <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateParameterObject <Hashtable>
    -TemplateUri <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateParameterFile <String>
    -TemplateFile <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateParameterFile <String>
    -TemplateUri <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateParameterUri <String>
    -TemplateFile <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateParameterUri <String>
    -TemplateUri <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]
Test-AzureRmResourceGroupDeployment
    -ResourceGroupName <String>
    [-Mode <DeploymentMode>]
    [-RollbackToLastDeployment]
    [-RollBackDeploymentName <String>]
    -TemplateUri <String>
    [-ApiVersion <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Test-AzureRmResourceGroupDeployment cmdlet determines whether an Azure resource group deployment template and its parameter values are valid.

Parameters

-ApiVersion

Specifies the API version that is supported by the resource Provider. You can specify a different version than the default version.

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

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

-Mode

Specifies the deployment mode. The acceptable values for this parameter are:

  • Incremental
  • Complete
Type:DeploymentMode
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Pre

Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of the resource group to test.

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

-RollBackDeploymentName

Rollback to the successful deployment with the given name in the resource group, should not be used if -RollbackToLastDeployment is used.

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

-RollbackToLastDeployment

Rollback to the last successful deployment in the resource group, should not be present if -RollBackDeploymentName is used.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TemplateFile

Specifies the full path of a JSON template file.

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

-TemplateParameterFile

Specifies the full path of a JSON file that contains the names and values of the template parameters.

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

-TemplateParameterObject

Specifies a hash table of template parameter names and values.

Type:Hashtable
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TemplateParameterUri

Specifies the URI of a template parameters file.

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

-TemplateUri

Specifies the URI of a JSON template file.

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

Inputs

None

Outputs

Microsoft.Azure.Commands.ResourceManager.Models.PSResourceManagerError