I was running the following command ...
New-AzureResourceGroup -Name $name -Location $location -TemplateFile $templateFile -siteName $siteName -hostingPlanName $hostingPlanName -siteLocation $location -Force
... and received an error that took awhile to understand:
New-AzureResourceGroup : A parameter cannot be found that matches parameter name 'siteName'.
At C:\Projects\Github\WadeWegner\azure-go-lang-site-extension\scripts\Deploy.ps1:17 char:84
+ ... $templateFile -siteName $siteName -hostingPlanName $hostingPlanName -siteLocati ...
When I removed the unknown parameters only then did it give this error:
New-AzureResourceGroup : Could not find file 'C:\Windows\system32\Template.json'.
At C:\Projects\Github\WadeWegner\azure-go-lang-site-extension\scripts\Deploy.ps1:17 char:1
+ New-AzureResourceGroup -Name $name -Location $location -TemplateFile $templateFi ...
Turns out, using the Windows PowerShell ISE, I was in the wrong directory and it couldn't fine the $templateFile.
It would be nice if the cmdlets raised on error on the missing TemplateFile rather than erroring on an unknown parameter.
I was running the following command ...
... and received an error that took awhile to understand:
When I removed the unknown parameters only then did it give this error:
Turns out, using the Windows PowerShell ISE, I was in the wrong directory and it couldn't fine the $templateFile.
It would be nice if the cmdlets raised on error on the missing TemplateFile rather than erroring on an unknown parameter.