Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从“中提取事件中心Microsoft azure的主键”;获得AzureRmEventHubKey“;命令电源外壳_Azure_Azure Powershell_Azure Eventhub - Fatal编程技术网

从“中提取事件中心Microsoft azure的主键”;获得AzureRmEventHubKey“;命令电源外壳

从“中提取事件中心Microsoft azure的主键”;获得AzureRmEventHubKey“;命令电源外壳,azure,azure-powershell,azure-eventhub,Azure,Azure Powershell,Azure Eventhub,我想从“Get-AzureRmEventHubKey”的输出中获取主键,并将其存储在变量中,如何通过powershell实现这一点?您可以尝试使用以下powershell cmdlet从中心提取主键: $PrimaryKey = Get-AzureRmEventHubKey -ResourceGroupName myResourceGroup -NamespaceName namespace_name -Name RootManageSharedAccessKey |Select -Expand

我想从“Get-AzureRmEventHubKey”的输出中获取主键,并将其存储在变量中,如何通过powershell实现这一点?

您可以尝试使用以下powershell cmdlet从中心提取主键:

$PrimaryKey = Get-AzureRmEventHubKey -ResourceGroupName myResourceGroup -NamespaceName namespace_name -Name RootManageSharedAccessKey |Select -ExpandProperty "PrimaryKey"

执行成功如果回答了您的问题,请单击“标记为答案”并向上投票。