Powershell for PowerPivot seems to be a bit of a mish-mash really.  There appears to be no way to provision a PowerPivot Service Application using Powershell which doesn’t use the Default Application Pool, and as far as I can see there appears to be no way to change the name of the Service Application database except through the Web UI (somebody please tell me otherwise …?).

Here’s how to change the PowerPivot Service Application Pool to one of your choosing (this script assumes you already have an Application Pool available called “My PowerPivot Service Application Pool” and that your database server is called “MySQLServer”:

New-PowerPivotServiceApplication -ServiceApplicationName "My PowerPivot Service Application" -DatabaseServerName "MySQLServer" -DatabaseName DefaultPowerPivotServiceApplicationDB -AddToDefaultProxyGroup
$sa = Get-PowerPivotServiceApplication | where {$_.DisplayName -eq "My PowerPivot Service Application"}
$applicationPool = Get-SPServiceApplicationPool  | where {$_.Name = "My PowerPivot Service Application Pool" };
$sa.ApplicationPool = $applicationPool;
$sa.Update();

Easiest way to change the database name it appears is to just do it through the UI.

Cheers

Dave Mc


3 responses

  1. I ran into an error and had to use PowerShell to create the PowerPivot service application. I set the database name in those scripts.

    I wrote a post covering how I did it here: http://kellydjones.com/archive/2011/09/18/146931.aspx

    1. Thanks for this, I’ll check these out!

    2. Ah Hah! I just noticed you’re using SP1. That option was definitely not there pre-SP1. I’ll have to update my scripts. Thanks Kelly!

Leave a reply to davemcmahon81 Cancel reply

The Blog

Dave Mc muses about history, travel, writing, coaching, astronomy, technology and life, family and the world around us. You may agree with his opinions, you may not, that’s life …