简体   繁体   English

将连接字符串与AzureRM.ServiceBus PowerShell cmdlet一起使用?

[英]Use connection string with AzureRM.ServiceBus PowerShell cmdlets?

To manage Azure Service Bus with AzureRM.ServiceBus PowerShell cmdlets, you get access using Login-AzureRmAccount, eg: 若要使用AzureRM.ServiceBus PowerShell cmdlet管理Azure Service Bus,您可以使用Login-AzureRmAccount访问,例如:

Login-AzureRmAccount
Get-AzureRmServiceBusNamespace -ResourceGroup myRG -NamespaceName myNS

Is there a way get access with AzureRM.ServiceBus using a connection string with manage claims? 有没有一种方法可以使用带有管理声明的连接字符串来访问AzureRM.ServiceBus? Eg as when using .NET Framework NamespaceManager: 例如,使用.NET Framework NamespaceManager时:

$namespaceManager = [Microsoft.ServiceBus.NamespaceManager]::CreateFromConnectionString($connectionString)

We could include a reference to the .NET assembly for Service Bus and create the NamespaceManager object ($NamespaceManager) from ConnectionString. 我们可以包括对Service Bus .NET程序集的引用,并从ConnectionString创建NamespaceManager对象($ NamespaceManager)。 And then we could use $NamespaceManager later in the script to provision and manage Service Bus entities. 然后,我们稍后可以在脚本中使用$ NamespaceManager来配置和管理Service Bus实体。 For detailed information, please refer to this documentation . 有关详细信息,请参阅此文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM