How to fix the following error

Deverick Durham 0 Reputation points
2024-10-12T12:45:44.52+00:00

Following a lab from Cyberinsight for creating private dns zone which has been created and it showing in virtual network links. Next step is to create a virtual machine to test the configuration, but I'm getting this error, " New-AzResourceGroup: A parameter cannot be found that matches parameter name 'TemplateFile'.

From Azure Powershell, I use $RGName = "cyberinsight"

I have ready uploaded the json files - azuredeploy.json and azuredeploy.parameters.json

After writting $RGName = "cyberinsight," I write the following as I see in the video.

New-AzResourceGroupDeployment -ResourceGroupName $RGName -TemplateFile azuredeploy.json -TemplateParametersFile azuredeploy.parameters.json which comes from the github.

I did not hear anything if I need to modify the json file, so where is this parameter name which in my case should be named "TemplateFile."

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
707 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,172 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Prasanna Sinde 2,680 Reputation points Microsoft Vendor
    2024-10-14T12:16:08.7233333+00:00

    Hi @Deverick Durham

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    Adding to @Rich Matheisen I have added a sample command and few points to check, please go through it.

    • Could you please use the below command and try to deploy the VM:
    New-AzResourceGroupDeployment -ResourceGroupName $RGName -TemplateFile azuredeploy.json -TemplateParameterFile azuredeploy.parameters.json
    
    • Make sure you are running the correct version of Azure PowerShell that supports the New-AzResourceGroupDeployment cmdlet.
    • Verify that the ARM template files [azuredeploy.json and azuredeploy.parameters.json] are in the correct location and are valid.
    • If you are using a newer version of Azure PowerShell, you might need to use the Az module instead of AzureRm.

    Kindly let us know if the above helps or you need further assistance on this issue.

    If this answers your query, I would appreciate it if you could accept the response as a "Accept Answer" and "Upvote it" so that it can help other members of the community who may be experiencing similar challenges.

    Thanks,

    Sai Prasanna.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.