question

AakashSharma-3739 avatar image
0 Votes"
AakashSharma-3739 asked HimanshuSinha-MSFT commented

Unable to connect to Azure Analysis services from Windows Powershell. Trying to setup AMO connaction to read server properties but getting error.

Please find the PowerShell script below which i wrote to connect to Azure Analysis services to fetch server properties.

[System.Reflection.Assembly]::LoadFile("C:\Users\xxxx\Desktop\AASproperties\microsoft.analysisservices.tabular.13.0.2150.3\lib\Microsoft.AnalysisServices.Core.DLL")

[System.Reflection.Assembly]::LoadFile("C:\Users\xxxx\Desktop\AASproperties\microsoft.analysisservices.tabular.13.0.2150.3\lib\Microsoft.AnalysisServices.Tabular.DLL")

[System.Reflection.Assembly]::LoadFile("C:\Users\xxxx\Desktop\AASproperties\microsoft.analysisservices.tabular.13.0.2150.3\lib\Microsoft.AnalysisServices.Tabular.Json.DLL")





$server = New-Object Microsoft.AnalysisServices.Tabular.Server

$connectionString = "Datasource=asazure://westeurope.asazure.windows.net/<serverName>:rw;initial catalog=<DB Name>;User ID=app:<SP id>@<tenant id>; Password = <secret>"

$server.Connect($connectionString)

Getting this error: "A connection cannot be made. Ensure that the server is running."


Points to note:

Server is running not paused.

Able to create ADOMD connection and can fetch data using DAX/MDX expression.

But cannot create AMO connection, failing with the above error.

Above script works fine with SQL Server Analysis services. (on-prem)


Also tried with old DLL i.e. "Microsoft.AnalysisServices.DLL" but getting the same above error.


Any help would be appreciated!

Thanks,
Aakash




windows-server-powershellazure-analysis-services
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @AakashSharma-3739 ,
Thanks for the ask and using the Microsoft Q&A platform .
At this time, we are reaching out to the internal team to get some help on this . We will update you once we hear back from them.
Just wanted to check if you got a chance to go through this ?
Thanks
Himanshu


0 Votes 0 ·

Hello @AakashSharma-3739 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu

0 Votes 0 ·

Hello @AakashSharma-3739 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu

0 Votes 0 ·

0 Answers