i'm trying write powershell script automate eventhub creation using azure powershell. following documentation outlined here , have installed azure powershell module (v 1.0.3).
i have added microsoft servicebus library (v3.0) using following
$scriptpath = split-path -parent $pscommandpath $dllpath = "$scriptpath\..\..\packages\windowsazure.servicebus.3.1.2\lib\net45-full\microsoft.servicebus.dll" add-type -path $dllpath
but try , use get-azuresbnamespace
command, e.g.
$currentnamespace = get-azuresbnamespace -name $namespace
i following error
get-azuresbnamespace : object reference not set instance of object.
the same true of new-azuresbnamespace
. have tried logging azure within same session using login-azurermaccount
, same object null reference exception.
is bug, or missing not outlined in documentation?
this because uses service management api , not resource manager api. me ran:
add-azureaccount
and get-azuresbnamespace , other sb cmdlets started working fine.
Comments
Post a Comment