title: How to pass extra parameters along with New-AzureRmResourceGroupDeployment cmdlet
body: <p>I'm writing a powershell  script to create VM using New-AzureRmResourceGroupDeployment cmdlet, which is as below.</p>
  
  <pre><code>New-AzureRmResourceGroupDeployment -Name VmDeployment  `
    -TemplateFile C:\template\template.json `
    -TemplateParameterFile C:\template\parameters.json
  </code></pre>
  
  <p>This is used create a VM. In <code>parameters.json</code> , there are some parameters like <code>virtualMachineName</code>, <code>networkInterfaceName</code> etc which are hardcoded.<br>
  Now I'm trying to automate these scripts , i.e they run on there own from a tool , when ever some condition is met.   </p>
  
  <p>My requirement here is , whenever this script runs, it has to increase the number in the VMName . Suppose the VM Name is now <code>VMName1</code>, it has to be <code>VMName2</code> when the script runs next time. Similarly <code>VMName3</code> when the script runs next time. Since the <code>virtualMachineName</code> parameter is hardcoded, this is not happening now. Is there anyway I can pass <code>virtualMachineName</code> as a parameter in the script itself rather than taking it from the json file.  </p>
  
  <p>Any guidance is highly appreciated.Thanks!</p>