使用Azure Powershell引发异常创建Azure总线服务

Creating Azure Bus Service using Azure Powershell throwing exception

我正在尝试使用Azure powershell命令创建Azure Service Bus。

我正在使用命令为:

1
New-AzureSBNamespace –Name UKBProjectServiceBus -Location"West US" -CreateACSNamespace $true -NamespaceType Messaging

但由于以下原因而出现异常:

New-AzureSBNamespace : InternalError: The server encountered an internal error. Please retry the request.
At line:1 char:1
+ New-AzureSBNamespace -Name UKBProjectServiceBus -Location"West US" - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureSBNamespace], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceBus.NewAzureSBNamespaceCommand
Can anyone please help me?


This PowerShell command for Service Bus will no longer be supported on 11/1/2019. The Azure Service Management model is deprecated for Service Bus, and will be disabled on that date. Please use the commands which support the Azure Resource Management model in AzureRM.ServiceBus.

正如Gaurav和Rohit所说,New-AzureSBNamespace是一个非常老的Powershell Cmdlet。

您可以使用New-AzureRmServiceBusNamespace -ResourceGroup $ResGrpName -NamespaceName $Namespace -Location $Location创建Azure ServiceBus。请参考这一章。
enter image description here

或使用New-AzServiceBusNamespace -ResourceGroupName Default-ServiceBus-WestUS -Name SB-Example1 -Location WestUS创建Azure ServiceBus。请参考这一章。
enter image description here