Share via


Use Windows PowerShell to Configure PowerPivot

This release includes new PowerShell cmdlets that you can use to configure an installation of PowerPivot for SharePoint. Fully configuring an installation requires the use of both SharePoint cmdlets and PowerPivot for SharePoint cmdlets.

Important

For a SharePoint 2010 farm, SharePoint 2010 SP1 must be installed before you can configure either PowerPivot for SharePoint, or a SharePoint farm that uses a SQL Server 2012 database server. If you have not yet installed the service pack, install it before you begin configuring the server.

Benefits of Configuring PowerPivot for SharePoint Using PowerShell

You can build Windows PowerShell script (.ps1) files to automate configuration tasks. This approach is recommended if you require scripted installation and configuration steps that you can run on any server. You might require such a script as part of a disaster recovery plan for rebuilding a server in the event of a hardware failure.

View a list of the PowerPivot Cmdlets on a Server

To view a list of the PowerPivot Cmdlets:

  1. Open SharePoint Management Shell using the Run as Administrator option.

  2. Enter the following command:

    Get-help *powerpivot*
    

    You should see a list of cmdlets that include PowerPivot in the cmdlet name. For example Get-PowerPivotServiceApplication. The number of cmdlets available depends on the version of Analysis Services you are using.

    • 10 cmdlets with SQL Server 2012 SP1 Analysis Services server configured for SharePoint mode, and SharePoint 2013. The 2012 SP1 version utilizes a new architecture that allows the Analysis Server to run outside the SharePoint farm. The new architecture and requires fewer management Windows PowerShell cmdlets.

    • 17 cmdlets with SQL Server 2012 Analysis Services server configured for SharePoint mode, and SharePoint 2010.

    For a list of the commands, see PowerPivot Reference for SharePoint PowerShell.

    If no commands are returned in the list or you see an error message similar to “get-help could not find *powerpivot* in a help file in this session.“, see the next section in this topic for instructions on how to enable the PowerPivot cmdlets on the server.

    All cmdlets have online help. The following example shows how to view the online help for the New-PowerPivotServiceApplication cmdlet:

    Get-help new-powerpivotserviceapplication -full
    

    Alternatively, to view just the examples, use the following syntax:

    Get-help new-powerpivotserviceapplication -example
    

Enable PowerPivot Cmdlets on a Server

PowerPivot cmdlets are available after you install PowerPivot for SharePoint and deploy the farm solution. The solutions are deployed when you ran the PowerPivot Configuration tool. Follow these steps to enable the use of cmdlets:

  1. Open SharePoint Management Shell using the Run as Administrator option.

  2. Run the first cmdlet:

    Add-SPSolution –LiteralPath “C:\Program Files\Microsoft SQL Server\110\Tools\PowerPivotTools\ConfigurationTool\Resources\PowerPivotFarm.wsp”
    

    The cmdlet returns the name of the solution, its solution ID, and Deployed=False. In the next step, you deploy the solution.

  3. Run the second cmdlet to deploy the solution:

    Install-SPSolution –Identity PowerPivotFarm.wsp –GACDeployment -Force
    
  4. Close the SharePoint Management Shell window. Reopen the window, using the Run as Administrator option.

  5. The PowerPivot cmdlets are now available.

PowerPivot Server Administration and Configuration in Central Administration

PowerPivot Configuration Tools

PowerPivot Reference for SharePoint PowerShell