How to disable azure service bus queue forwardto using powershell

Rangineni, Dheeraj 20 Reputation points
2025-04-24T14:05:15.1333333+00:00

As per this article https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-auto-forward?source=docs#using-azure-powershell I am able to enable auto forwarding for azure service bus queues but how can I disable auto forwarding using powershell script?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
689 questions
{count} votes

Accepted answer
  1. Khadeer Ali 5,065 Reputation points Microsoft External Staff Moderator
    2025-04-24T20:20:54.8366667+00:00

    @Rangineni, Dheeraj ,

    To remove the forwarding configuration from your Azure Service Bus queue, please run the following command in a bash shell using Azure CLI:

    
    az servicebus queue update \
      --resource-group <YourResourceGroup> \
      --namespace-name <YourNamespaceName> \
      --name <YourQueueName> \
      --remove forward_to
    

    Replace <YourResourceGroup>, <YourNamespaceName>, and <YourQueueName> with your actual resource group, namespace, and queue names.

    This command will clear the forward_to property from the queue without needing to recreate it. Please ensure that you are using the latest version of Azure CLI and are logged into the correct subscription.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.