Dec*_*lty 5 powershell cmdlets azure azure-powershell octopus-deploy
我正在尝试Get-AzureRmEventHubNamespaceKey在 Octopus 中的 Azure Powershell 步骤中运行cmdlet。
我收到以下错误:
Get-AzureRmEventHubNamespaceKey : The Azure PowerShell session has not been properly
initialized. Please import the module and try again
Run Code Online (Sandbox Code Playgroud)
该模块安装在八达通服务器的以下目录中:
C:\Program Files (x86)\Microsoft
SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.EventHub
作为同一步骤的一部分,我尝试先导入模块:
Import-Module –Name "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.EventHub" -Verbose
我可以在输出中看到它已被导入:
VERBOSE: Importing cmdlet 'Get-AzureRmEventHubNamespaceKey'.
但紧随其后的是上述错误。如果我 RDP 到章鱼服务器并直接从那里运行它运行良好。
关于可能导致这种情况的任何想法?
| 归档时间: |
|
| 查看次数: |
2792 次 |
| 最近记录: |