I'm attempting to process cubes and dimensions in powershell. It has been working for awhile but all of a sudden it stops. I can process the dimensions and cubes in visual studio but processing them with a powershell script in the same order gives me a duplicate attribute key error.
Powershell Script:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")
$serverAS = New-Object Microsoft.AnalysisServices.Server
$serverAS.connect("SERVER")
$db = $serverAS.databases["ANALYSIS DB"]
$db.cubes | select name, storagemode, lastprocessed
$db.dimensions | select name, isparentchild, lastprocessed, storagemode
Foreach ($c in $db.dimensions) {$c.process("ProcessFull")}
Foreach ($c in $db.cubes) {$c.process("ProcessFull")}
Thanks for the response. I was actually able to get around this by using SSDT and Integration Services to process Dimensions and Cubes.