我想从“Get-AzureRmEventHubKey”的输出中获取主键并将其存储在变量中,如何通过 powershell 执行此操作?
最佳答案
您可以尝试以下 PowerShell cmdlet 从 Even-hub 中提取主键:
$PrimaryKey = Get-AzureRmEventHubKey -ResourceGroupName myResourceGroup -NamespaceName namespace_name -Name RootManageSharedAccessKey |Select -ExpandProperty "PrimaryKey"
关于azure - 从 "Get-AzureRmEventHubKey "命令 power-shell 中提取事件中心 Microsoft-azure 的主键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52160219/