Creating SSAS 2008 cube partitions using Powershell?

Question:

How can we create SSAS 2008 cube partitions using Powershell?

Answer:

This adds a partition to the Adventure Works DW 2008R2 cube (specifically the Internet Customers measure group in the Adventure Works cube):

You’ll have to change variables up top, and the reference to the Microsoft.AnalysisServices.dll assembly, but other than that, this will work peachy keen.

The trick is to call Update() on the object changed and then on the whole database itself.

If you’d like to process the new partition, as well, you can do that with the following line before $srv.Disconnect:

You can learn more about Analysis Management Objects (AMO) here.

Source:

Creating SSAS 2008 cube partitions using Powershell? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply