Using below code to backup Azure Analysis Tabular Model:
Backup-ASDatabase -Server $ServerName -BackupFile $BkupFile -Name $CubeName -ApplyCompression -ErrorAction Stop
But get below issue: Backup-ASDatabase : This feature is not supported in AS Azure.
Above code snippet however works fine for On Prem Tabular model. Checked online for solutions and found below link, which suggests using Azure Automation account and PowerShell Workflow
https://gallery.technet.microsoft.com/scriptcenter/Azure-Analysis-Backup-a06df3ad#content
Get below issue, if I use the code from above link:
Cannot find the 'Backup-ASDatabase' command. If this command is defined as a workflow, ensure it is defined before the workflow that calls it. If it is a command intended to run directly within Windows PowerShell (or is not available on this system), place it in an InlineScript: 'InlineScript { Backup-ASDatabase }'
Tried enclosing the code in InlineScript but get the same issue. Can I get some leads or a simple work around to do this simple task of just backing up Azure Analysis Tabular Model.
Backup-ASDatabase : This feature is not supported in AS Azure.
Then saw that my PS cmdlet was outdated, imported the required version and was finally able to take backup. Thanks! – Joseph