从"Get-AzureRmEventHubKey"命令power-shell中提取event-hub Microsoft-azure的主键 [英] Extraction of primary key of event-hub Microsoft-azure from “ Get-AzureRmEventHubKey ” command power-shell

查看:63
本文介绍了从"Get-AzureRmEventHubKey"命令power-shell中提取event-hub Microsoft-azure的主键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从"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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆