从"Get-AzureRmEventHubKey"命令power-shell中提取event-hub Microsoft-azure的主键 [英] Extraction of primary key of event-hub Microsoft-azure from “ Get-AzureRmEventHubKey ” command power-shell
问题描述
我想从"Get-AzureRmEventHubKey"的输出中获取主键;并存储它 在变量中,如何通过powershell做到这一点?
PrimaryKey = Get-AzureRmEventHubKey -ResourceGroupName myResourceGroup -NamespaceName名称空间-Name RootManageSharedAccessKey |选择-ExpandProperty"PrimaryKey"--------------- -------------------------------------------------- ------------------------------
如果此答案有帮助,请单击标记为答案"或向上" -投票".要提供有关您的论坛体验的其他反馈,请单击 在这里 >>
I want to take primary key from the output of "Get-AzureRmEventHubKey" and store it in a variable, how can I do that through powershell?
解决方案You may try the following PowerShell cmdlet to extract primary key from even-hub:
PrimaryKey = Get-AzureRmEventHubKey -ResourceGroupName myResourceGroup -NamespaceName namespace_name -Name RootManageSharedAccessKey |Select -ExpandProperty "PrimaryKey"-----------------------------------------------------------------------------------------------
If this answer was helpful, click "Mark as Answer" or "Up-Vote". To provide additional feedback on your forum experience, click here
这篇关于从"Get-AzureRmEventHubKey"命令power-shell中提取event-hub Microsoft-azure的主键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!