-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
ARMService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.
Description
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.
Metadata
Metadata
Assignees
Labels
ARMService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.