术语"New-AzureRmServiceBusNamespace"未被识别为cmdlet,函数,脚本文件或可运行程序的名称 [英] The term 'New-AzureRmServiceBusNamespace' is not recognized as the name of a cmdlet, function, script file, or operable program
问题描述
我遇到了错误
术语" New-AzureRmServiceBusNamespace "不能识别为cmdlet,函数,脚本文件或可运行程序的名称.
The term 'New-AzureRmServiceBusNamespace' is not recognized as the name of a cmdlet, function, script file, or operable program.
如果我尝试运行导入模块AzureRM.ServiceBus ,我将收到错误消息
If i try to run Import-Module AzureRM.ServiceBus I get below error
模块清单中的成员'FormatsToProcess'无效:找不到路径'C:\ Program Files(x86)\ Microsoft SDKs \ Azure \ PowerShell \ ResourceManager \ AzureResourceManager \ AzureRM.ServiceBus.\ Microsoft.Azure.Commands .ServiceBus.format.ps1xml",因为它不存在.请确保在文件"C:\ Program Files(x86)\ Microsoft SDKs \ Azure \ PowerShell \ ResourceManager \ AzureResourceManager \ AzureRM"中为此字段指定了一个有效值.ServiceBus \ AzureRM.ServiceBus.psd1'.
The member 'FormatsToProcess' in the module manifest is not valid: Cannot find path 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.ServiceBus.\Microsoft.Azure.Commands.ServiceBus.format.ps1xml' because it does not exist.. Please make sure that a valid value is specified for this field in file 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.ServiceBus\AzureRM.ServiceBus.psd1'.
如在1.0.5版中加载azure.profile 所建议的,我使用"安装模块AzureRM -Verbose -Force "重新安装了Azureure PowerShell.此后,New-AzureRmServiceBusNamespace被识别,但低于错误
As suggested on Error loading azure.profile in 1.0.5, I reinstalled azure PowerShell using "Install-Module AzureRM -Verbose -Force". After that New-AzureRmServiceBusNamespace is identified but getting below error
术语' Login-AzureRmAccount '不被识别为cmdlet,函数,脚本文件或可运行程序的名称."
"The term 'Login-AzureRmAccount' is not recognized as the name of a cmdlet, function, script file, or operable program.".
解决此错误的解决方案是使用MSI重新安装Azure PowerShell.之后,确定了 Login-AzureRmAccount ,但 New-AzureRmServiceBusNamespace 再次丢失.我要转圈.
The solution to fix this error is reinstalling Azure PowerShell by using MSI. After that Login-AzureRmAccount is identified but New-AzureRmServiceBusNamespace goes missing again. I'm going in circles.
我必须在不破坏 Login-AzureRmAccount 的情况下使 New-AzureRmServiceBusNamespace 正常工作.请帮助我.
I've to make New-AzureRmServiceBusNamespace work without breaking Login-AzureRmAccount. Please help me.
推荐答案
请首先检查您的Azure PowerShell版本,您可以使用以下cmdlet.
Please check your Azure PowerShell version firstly, you could use the following cmdlet.
Get-Module -ListAvailable -Name Azure -Refresh
我的版本是3.6.0. New-AzureRmServiceBusNamespace
和Login-AzureRmAccount
都为我工作.如果您的版本不是最新版本,建议您将其更新为最新版本.您可以从此链接下载PS版本3.6.0.
My version is 3.6.0. New-AzureRmServiceBusNamespace
and Login-AzureRmAccount
all work for me. If your version is not latest, I suggest you could update your version to latest. You can download the PS version 3.6.0 installation file from this link.
评论更新:
当OP将他的笔记本电脑从Windows 7升级到Windows 10时,它可以正常工作.
When OP upgrade his laptop from Windows 7 to Windows 10, it works fine.
这篇关于术语"New-AzureRmServiceBusNamespace"未被识别为cmdlet,函数,脚本文件或可运行程序的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!