I’m trying to pass parameters to an existing Azure template parameter file (JSON). The files are located on a storage container in Azure. For testing purposes, I’m starting off with only two parameters: location and vmName.
Here is the code I’m working with:
$location = "eastus" $vmName = "tst-win-sqlpoc" New-AzResourceGroupDeployment -ResourceGroupName $resourceGroup -Name win2016Deployment ` -TemplateUri "https://storage.blob.core.windows.net/templates/createWin2016VM.json" ` -TemplateParameterUri "https://storage.blob.core.windows.net/templates/createWin2016Parameters.json" ` -location $location -virtualMachineName $vmName
However, it’s not detecting the values I supplied and continues using the values already in the file:
-location : The term '-location' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:8 char:5 + -location $location -virtualMachineName $vmName + ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (-location:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Any help would be great?!