我想从“Get-AzureRmEventHubKey”的输出中获取主键并将其存储在变量中,如何通过PowerShell执行此操作?
您可以尝试使用以下PowerShell cmdlet从even-hub中提取主键:
$PrimaryKey = Get-AzureRmEventHubKey -ResourceGroupName myResourceGroup -NamespaceName namespace_name -Name RootManageSharedAccessKey |Select -ExpandProperty "PrimaryKey"