Execute XMLA script on Azure VM using powershell

Viewed 181

I have generated a XMLA script from on premise SSAS cube , i need to execute this XMLA script in a automated way on Azure VM using powershell , the script should be idempotent in a way that if the cube/database already exists on azure vm dont execute the XMLA script otherwise go ahead and execute it.

I did search a lot in google to find if we can use any if exists kind of clause to XMLA script but i didn't find anything that is useful , any help is appreciated

1 Answers

You can execute the XMLA-Script like this in powershell

Invoke-ASCmd -server $server -Query $xmladoc -Credential $pscredential

For more Information you can check the Microsoft Docs

Related