View on GitHub

powerSSAS

A Powershell provider for SQL Server Analysis Services

Download this project as a .zip file Download this project as a tar.gz file

powerSSAS is a PowerShell snapin for SQL Server Analysis Services. It implements a provider with all the interfaces required to enable you to navigate an SSAS server like a drive and includes a number of cmdlets for working with SSAS.

Currently the provider is a fairly thin wrapper over the AMO object model. The aim is to extend the object model to make easy to work with SSAS from the command line and to also add a number of useful cmdlets to make certain tasks easier.

Introduction to PowerSSAS

PowerSSAS release announcement - this is currently the best overview of what powerSSAS has to offer.

Installation Instructions

The current version comes with a full installer, once it is installed you just need to add the snapin to your session and you are off. The following example will load the provider and create a drive in powershell called “ssas:” that is connect to the default Analysis Services instance on the localhost.

PS > add-pssnapin powerSSAS
PS > new-psdrive ssas powerSSAS localhost 

You can then type “ssas:” to navigate to the drive and start using “dir” and “cd” to naviagate around like you would on a file system.

The installer is very simple, but if you have issues installing powerSSAS check out the Installation Troubleshooting Guide

Alternative Installation as a Module

As of v 0.3.1.0 you can install PowerSSAS as a PowerShell v2 module. see: Installing PowerSSAS as a v2 module

Features

Cmdlet Description
add-ASAssembly Adds an Assembly to an SSAS server or database
backup-AsDatabase Backs-up an SSAS database
clear-ASSession Clears the specified Session
get-ASCube Returns a list of Cubes
get‑ASCubePermission Returns a set of CubePermissions
get-ASDatabase Returns a list of Databases
get-ASDimension Returns a list of Dimensions
get-ASLock Returns a list of Locks
get-ASRole Returns a list of Roles
get-ASServer Returns the specified server object
get-ASSession Returns a list of sessions
Get-ASTrace Returns a list of the current server side traces
Get-ASTraceSubclass Returns a list of the Trace Subclasses that are specific to Analysis Services
get-AsConnection Returns a list of current connections
Invoke-AsDiscover Executes the specified Discover command against Analysis Services
Invoke-AsExecute Executes the specified command against Analysis Services
Invoke-AsMdx Executes the specified MDX command against Analysis Services
New-ASScript Scripts out a give object to an XMLA Create or Alter script
Remove‑ASClrAssembly Removes a specified CLR Assembly
restore-AsDatabase Restores an SSAS Database
Send-XmlaDiscover Sends an Xmla Discover command

Examples