We have a set of SSAS 2005 databases that are maintained by various employees. The metadata/schema including format strings, etc. have evolved to represent a significant amount of work and they change periodically. We've tried having the business intelligence projects under source control, but it would also be nice to have a nightly backup of all SSAS metadata, without the data itself. (The data is of course huge and reproducible, whereas the schema is tiny.)
I can programmatically (C#) loop through all the SSAS dbs easily with the Microsoft.AnalysisServices.Server.Databases collection, but I haven't found a simple way to back up the schema without the data. Using SSMS, I can right-click the db and choose [Script Database as]-->[CREATE To]-->[File ...] for example and get XMLA representing the entire database metadata. This is referenced here: http://msdn.microsoft.com/en-us/library/ms174589.aspx, and I believe this has all the information we'd like to back up... however I haven't found methods providing similar functionality in the Microsoft.AnalysisServices assembly and am not sure where else to look.
I know I may be kind of late, but here it goes..
This is PowerShell, but converting to C# is a breeze:
It's not mine, I found it here where Darren Gosbell posted it.