以前的PowerShell模块AzureRm.EventHub
具有Get-AzureRmEventHubNamespaceKey
,并且很容易获取键。由于Powershell V5,现在已将其删除。现在,如何获得EventHubNamespace SAS密钥。这是我在计算机中发现的PowerShell获取CMDLET的列表。
Get-AzureRmEventHub
Get-AzureRmEventHubAuthorizationRule
Get-AzureRmEventHubConsumerGroup
Get-AzureRmEventHubGeoDRConfiguration
Get-AzureRmEventHubKey
Get-AzureRmEventHubNamespace
Get-AzureRmIotHubEventHubConsumerGroup
谢谢
您可以使用Invoke-AzureRmResourceAction
来做到这一点:
Invoke-AzureRmResourceAction -ResourceGroupName rgName -ResourceType Microsoft.EventHub/namespaces/AuthorizationRules -ResourceName eventhubName/RootManageSharedAccessKey -Action listKeys -ApiVersion 2015-08-01 -Force