Hi
I need to get the ConnectionString of a Service Bus Queue using PowerShell or at least the using the .Net assembly Microsoft.ServiceBus.dll via PowerShell. I need it to put in a config file. I need the ConnectionString for an actual queue not just the Service Bus itself.
I have tried the code below but the ConnectionString doesn't seem to exist here so I'm not sure where to get it. Can anyone help please?
$CurrentNamespace = Get-AzureSBNamespace -Name $ServiceBusNamespace
$NamespaceManager = [Microsoft.ServiceBus.NamespaceManager]::CreateFromConnectionString($CurrentNamespace.ConnectionString);
$NamespaceManager.GetQueue($Queue) | select -ExpandProperty ConnectionString
Thanks
Robert