【发布时间】:2016-01-24 19:43:57
【问题描述】:
我正在尝试编写一个 PowerShell 脚本来使用 Azure PowerShell 自动创建 EventHub。我正在关注here 概述的文档,并已安装 Azure PowerShell 模块 (v 1.0.3)。
我使用以下代码添加了 Microsoft ServiceBus 库 (v3.0)
$scriptPath = Split-Path -parent $PSCommandPath
$dllPath = "$scriptPath\..\..\packages\WindowsAzure.ServiceBus.3.1.2\lib\net45-full\Microsoft.ServiceBus.dll"
Add-Type -Path $dllPath
但是一旦我尝试使用Get-AzureSBNamespace 命令,例如
$CurrentNamespace = Get-AzureSBNamespace -Name $Namespace
我收到以下错误
Get-AzureSBNamespace : Object reference not set to an instance of an object.
New-AzureSBNamespace 也是如此。我还尝试使用Login-AzureRmAccount 在同一会话中登录 Azure,但得到相同的对象空引用异常。
这是一个错误,还是我遗漏了文档中未列出的内容?
【问题讨论】:
-
我想跳过其他一些安全漏洞吗?例如SSL证书等
标签: powershell azure servicebus