Warning: Undefined array key "is_rate_editable" in /home/vhosts/itexperience.net/httpdocs/wp-content/plugins/wpdiscuz/class.WpdiscuzCore.php on line 1303
Get-AzureRmAnalysisServicesServer : Object reference not set to an instance of an object. in Azure - itexperience.net

Get-AzureRmAnalysisServicesServer : Object reference not set to an instance of an object. in Azure

To manage Azure Analysis Services from Powershell, you first need to install the module AzureRM (elevated Powershell!) :

Install-Module -Name AzureRM -AllowClobber

Then, import the module:

Import-Module AzureRM

Then, when I tried to get all Azure Analysis Services from my Azure Subscription, I got the following error:

PS C:\WINDOWS\system32>Get-AzureRmAnalysisServicesServer -ResourceGroupName AnalServices
Get-AzureRmAnalysisServicesServer : Object reference not set to an instance of an object.
At line:1 char:1
+ Get-AzureRmAnalysisServicesServer -ResourceGroupName AnalServices
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureRmAnalysisServicesServer], NullReferenceException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.AnalysisServices.GetAzureAnalysisServicesServer

The error is pretty unclear, since it has nothing to do with an object reference. It actually means you first need to connect to your Azure subscription. For example, if you run the cmdlet…

PS C:\WINDOWS\system32>Get-AzureRmActionGroup
Get-AzureRmActionGroup : No account found in the context. Please login using Connect-AzureRmAccount.

…it’ll become more than clear that you first need to login. Therefor, run:

Connect-AzureRmAccount

Fill in username and password to connect.
Afterwards, re-run Get-AzureRmAnalysisServicesServer to get the following result:

PS C:\Windows\System32> Get-AzureRmAnalysisServicesServer -ResourceGroupName AnalServices
Sku : {[Name, S1], [Tier, Standard]}
AsAdministrators : {}
State : Succeeded
ProvisioningState : Succeeded
Id : /subscriptions/id/resourceGroups/AnalServices/providers/Microsoft.AnalysisServices/servers/analservices
Name : Analservices
Type : Microsoft.AnalysisServices/servers
Location : West Europe
ServerFullName : asazure://westeurope.asazure.windows.net/analservices
BackupBlobContainerUri :
Tag : {}
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x