gpt4 book ai didi

azure - 术语 'New-AzResourceGroupDeployment' 未被识别为 cmdlet、函数的名称

转载 作者:行者123 更新时间:2023-12-02 22:53:38 24 4
gpt4 key购买 nike

我需要在 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...

你能告诉我我该怎么办吗?

最佳答案

您需要安装Azure Powershell模块:

您可以仅查找此命令的命令:

Install-Module -Name Az.Resources -AllowClobber -Scope CurrentUser

或者全部:

Install-Module -Name Az -AllowClobber -Scope CurrentUser

参见here了解详情

关于azure - 术语 'New-AzResourceGroupDeployment' 未被识别为 cmdlet、函数的名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58646524/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com