I have power shall script that runs the xmal script I need to pass the $Cube and $DatabaseId variables to xmla file to run on the cube. I can pass the $(DatabaseID) in .bat file. can I do it in powershell?
$path = (Get-Location)
$serverName = $args[0]
$cube = "MODPIMConsumer"
$DatabaseID ="Consumer Subscription Datamart"
Invoke-ASCmd -Server "$serverName" -InputFile "$path\scripts\ClearCache.mdx"
xmla file
<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"><ClearCache>
<Object>
<DatabaseID>$(DatabaseID)</DatabaseID>
</Object>
</ClearCache>
</Batch>