【问题标题】:LogicApps on VS2019 says "The term 'Get-AzureRmResourceGroup' is not recognized"VS2019 上的逻辑应用程序显示“无法识别术语 'Get-AzureRmResourceGroup'”
【发布时间】:2020-12-07 15:53:50
【问题描述】:

如何在不删除 Az 的情况下解决我的问题?

我已删除 RM 并安装了 Az。 我在 VS2019 (16.6.5) 上有 LogicApps 并尝试部署。

我得到错误:

"The term 'Get-AzureRmResourceGroup' is not recognized as the name of a cmdlet, function, script file..."

我接下来尝试通过 PS C:\WINDOWS\system32> Install-Module AzureRM 重新安装 RM

ackageManagement\Install-Package : The following commands are already available on this syste
m:'Login-AzAccount,Logout-AzAccount,Resolve-Error,Send-Feedback'. This module 'AzureRM.profile
' may override the existing commands. If you still want to install this module 'AzureRM.profil
e', use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPac 
kage) [Install-Package], Exception
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable, 
Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

【问题讨论】:

  • 你的意思是你使用powershell来部署逻辑应用吗?为什么不使用Publish 按钮?
  • VS好像缺少RM

标签: visual-studio powershell azure-logic-apps


【解决方案1】:

Az 和 AzureRM 不能并排导入到同一个 PowerShell 会话中。如果您不想立即将脚本从 AzureRM 迁移到 Az,有两个主要选项:

在 PowerShell Core 中安装 Az,并在 Windows PowerShell 中保留 AzureRM 在 Windows PowerShell 中并排安装 Az 和 AzureRM,并确保脚本不会混合模块

详细步骤记录在here

参考:https://docs.microsoft.com/en-us/powershell/azure/migrate-from-azurerm-to-az

【讨论】:

    猜你喜欢
    • 2021-07-02
    • 2020-02-14
    • 2020-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-07
    • 2012-09-05
    • 2016-06-02
    相关资源
    最近更新 更多