Forum Discussion
Connecting to PowerBI Dataset from a PS Script: "The Connection String is not valid"
- 3 years ago
Hi Alibek ,
Write "Cube" instead of "Catalog", see reference: https://learn.microsoft.com/en-us/analysis-services/instances/connection-string-properties-analysis-services?view=asallproducts-allversions#cube
Make sure all other preconditions for enabling the XMLA API are met, including using a Premium workspace, having XMLA access enabled in the tenant settings and make sure the user has the necessary privileges.
In the Power BI CmdLets there is not relly support for XMLA access except the generic Invoke-PowerBIRestMethod in combination with the executeQueries REST Method. But this can only execute DAX queries and not XMLA calls like refreshing a single partition or creating a calculation group.
BR
Martin
HI Alibek,
I'd like to suggest you use powershell cmdlet model to handle and operate with power bi service contents.
Power BI Cmdlets reference | Microsoft Learn
Regards,
Xiaoxin Sheng