azure - 从“Get-AzureRmEventHubKey”命令 power-shell 中提取 event-hub Microsoft-azure 的主键
问题描述
我想从“Get-AzureRmEventHubKey”的输出中获取主键并将其存储在一个变量中,我该如何通过 powershell 做到这一点?
解决方案
您可以尝试以下 PowerShell cmdlet 从 even-hub 中提取主键:
$PrimaryKey = Get-AzureRmEventHubKey -ResourceGroupName myResourceGroup -NamespaceName namespace_name -Name RootManageSharedAccessKey |Select -ExpandProperty "PrimaryKey"
推荐阅读
- javascript - 如何使我的 JavaScript 库全球化?
- java - 将资产中的 pdf 文档导入 PdfDocument 对象
- android - Android Q - 当片段之间的自定义动画是垂直而不是水平时,向后滑动手势行为不直观
- python - python获取列表中数字开始和结束位置的索引
- swift - Xcode 11 转场
- python-3.x - 如何在我的代码中添加异常以跳过 AttributeError?
- css - android设备中的浮动字体
- javascript - 如何在智能感知中为 javascript 显式设置泛型类型
- d3.js - 在 D3 v5 中悬停在悬停的圆圈顶部附加圆圈
- bash - 使用 spark-submit 查看在 spark 上运行的 python 脚本中的打印