0
votes

I'm trying to create Azure Service Bus using Azure powershell command.

I'm using command as :

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

But getting exception as:

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?

1
I believe you're using a really old PowerShell Cmdlet. Please use New-AzureRmServiceBusNamespace instead (docs.microsoft.com/en-us/azure/service-bus-messaging/…).Gaurav Mantri
you could also consider New-AzServiceBusNamespace docs.microsoft.com/en-us/powershell/module/az.servicebus/… .. on a side note you're trying to create an ACS namespace as well, which is retired too by now I guess.Rohit Saigal

1 Answers

1
votes

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.

As Gaurav and Rohit said, the New-AzureSBNamespace is a really old Powershell Cmdlet to use.

You could use New-AzureRmServiceBusNamespace -ResourceGroup $ResGrpName -NamespaceName $Namespace -Location $Location to create Azure ServiceBus. Refer to this one. enter image description here

Or use New-AzServiceBusNamespace -ResourceGroupName Default-ServiceBus-WestUS -Name SB-Example1 -Location WestUS to create Azure ServiceBus. Refer to this one. enter image description here