Articles → MICROSOFT AZURE → Whatif Command For Azure ARM

Whatif Command For Azure ARM



  1. Upgrade the PowerShell
  2. Install 1.12.1-preview of Az.Resources module
  3. Create an IP address and download the template files
  4. Run whatif command

Upgrade The Powershell

iex "& { $(irm } -UseMSI"

Install 1.12.1-Preview Of Az.Resources Module

Install-Module Az.Resources -RequiredVersion 1.12.1-preview -AllowPrerelease

Create An IP Address And Download The Template Files

Picture showing the downloaded template files
Click to Enlarge

Picture showing setting the value attribute in parameters.json file
Click to Enlarge

Run Whatif Command

New-AzResourceGroupDeployment -ResourceGroupName "RG2" -TemplateParameterFile ./parameters.json -TemplateFile ./template.json -WhatIf

Picture showing the output of whatif command in Azure
Click to Enlarge

New-AzResourceGroupDeployment -ResourceGroupName "RG2" -TemplateParameterFile ./parameters.json -TemplateFile ./template.json

Picture showing the execution of New-AzResourceGroupDeployment command in PowerShell
Click to Enlarge

Posted By  -  Karan Gupta
Posted On  -  Thursday, May 19, 2022


Your Email Id  
Query/FeedbackCharacters remaining 250