【发布时间】:2019-10-31 15:20:01
【问题描述】:
我需要在我的 PowerShell 中运行以下命令:
New-AzResourceGroupDeployment
-Name Myrg1010
-ResourceGroupName ADFcslResourceGroup
-TemplateFile C:\ADFARM.json
-TemplateParameterFile C:\ADFARM-Parameters.json
在运行此命令之前,我已连接到我的 Azure 订阅
Connect-AzAccount
但我有以下错误:
New-AzResourceGroupDeployment : The term 'New-AzResourceGroupDeployment' 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:1 char:1
+ New-AzResourceGroupDeployment -Name MyARMDeployment -ResourceGroupNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-
AzResourceGroupDeployment:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我找到了这个 article 但这不是我的情况,因为我的 powershell 版本是 5.1.2
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 5.1.2 Azure {Get-
AzureAutomationCertificate, Get-AzureAutomationConnection, New-AzureAuto...
你能告诉我该怎么做吗?
【问题讨论】:
-
您是否安装了模块 Az 资源?
标签: azure powershell azure-resource-group