【发布时间】:2019-12-23 11:49:21
【问题描述】:
我收到以下错误
New-AzResourceGroup : A positional parameter cannot be found that accepts argument 't'.
At line:1 char:1
+ New-AzResourceGroup -Name @rgName -Location @location -Tag @{LoB="pla ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-AzResourceGroup], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGrou
pCmdlet
尝试使用以下代码创建新资源组时。问题出在哪里?
$rgName = "storage-dev-rg"
$location = "eastus"
New-AzResourceGroup -Name @rgName -Location @location -Tag @{LoB="platform"; CostCenter="IT"}
【问题讨论】:
标签: powershell syntax parameter-passing