Scripting Objects Using SQL Server Management Studio

Scripting objects in SQL Server Management Studio is accomplished by right-clicking an Analysis Services object and selecting either Create to, Alter to, or Delete to. Each of these options can be directed to a window or a file, but regardless of where the script is directed to, it will come in the form of a DDL script in an XMLA wrapper. One great advantage to such scripts is that they can be run against any server you point them at. Also, names in the scripts can be changed and run on an iterative basis for mass construction, alteration, or deletion of objects.