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






Leave a reply to davemcmahon81 Cancel reply