VS2019上的LogicApps说"The term 'Get-AzureRmResourceGroup' is not recognized"



如何在不删除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>重新安装RM;安装模块AzureRM

ackageManagementInstall-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 FilesWindowsPowerShellModulesPowerShellGet1.0.0.1PSModule.psm1:1809 char:21
+ ...          $null = PackageManagementInstall-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPac 
kage) [Install-Package], Exception
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable, 
Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

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

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

在此处记录了详细步骤

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

最新更新