Compartir a través de


Uso de PowerShell para comprobar PowerPivot para SharePoint

Se aplica a: SQL Server 2019 y versiones anteriores de Analysis Services Azure Analysis Services Fabric/Power BI Premium

Importante

La minería de datos estaba en desuso en SQL Server 2017 Analysis Services y ahora se descontinuó en SQL Server 2022 Analysis Services. La documentación no se actualiza para las características en desuso y descontinuadas. Para más información, consulte Compatibilidad con versiones anteriores de Analysis Services.

No se completa ninguna operación de instalación o recuperación de Power Pivot para SharePoint sin una prueba de comprobación sólida que confirme que los servicios y los datos están operativos. En este artículo, le mostramos cómo realizar estos pasos mediante Windows PowerShell. Colocamos cada paso en su propia sección para que pueda ir directamente a tareas específicas. Por ejemplo, ejecute el script en la sección Bases de datos de este tema para comprobar el nombre de la aplicación de servicio y las bases de datos de contenido si desea programarlos para mantenimiento o copia de seguridad.

Se incluye un script completo de PowerShell en la parte inferior del tema. Use el script completo como punto de partida para crear un script personalizado para auditar la implementación completa de Power Pivot para SharePoint.

Preparación del entorno de PowerShell

Los pasos de esta sección preparan el entorno de PowerShell. Es posible que no sea necesario realizar los pasos, en función de cómo esté configurado el entorno de scripting.

Permisos de PowerShell

Abra una ventana de PowerShell o PowerShell ISE (entorno de scripting integrado) con privilegios administrativos. Si no tiene privilegios administrativos al ejecutar comandos, verá un mensaje de error similar al siguiente:

Get-SPLogEvent : debe tener privilegios de administrador de equipos para ejecutar este cmdlet.

SharePoint y Power Pivot para SharePoint Módulo

Si ve un mensaje de error similar al siguiente al ejecutar cmdlets relacionados con SharePoint, ejecute el comando Add-PSSnapin:

El término "Get-PowerPivotSystemService" no se reconoce como el nombre de un cmdlet, una función, un archivo de script o un programa operable. Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso, compruebe que dicha ruta es correcta e inténtelo de nuevo.

Add-PSSnapin Microsoft.Sharepoint.Powershell -EA 0  

Windows PowerShell

PowerPivot en el conjunto de aplicaciones generales de SharePoint Opcionalmente, puede verificar la mayoría de los componentes en Administración Central mediante el panel de administración de Power Pivot. Para abrir el panel en Administración central, haga clic en Configuración general de la aplicación y, a continuación, haga clic en Panel de administración en Power Pivot. Para obtener más información sobre el panel, consulte Panel de administración de Power Pivot y Datos de uso.

Síntomas y acciones recomendadas

La tabla siguiente es una lista de síntomas o problemas y la sección sugerida de este tema para consultar para ayudarle a resolver el problema.

Síntoma Consulte la sección
La actualización de datos no se está ejecutando Consulte la sección Trabajos del temporizador y compruebe que el Online Power Pivot Data Refresh Timer Job está disponible.
Los datos del panel de administración son antiguos Consulte la sección Trabajos del temporizador y compruebe que el trabajo del temporizador de procesamiento del panel de administración está en línea.
Algunas partes del panel de administración Si instala Power Pivot para SharePoint en una granja de servidores que tiene la topología de Administración central, sin Excel Services o Power Pivot para SharePoint, debe descargar e instalar la biblioteca cliente de Microsoft ADOMD.NET si desea acceder completo a los informes integrados en el panel de administración de Power Pivot. Algunos informes del panel usan ADOMD.NET para acceder a datos internos que proporcionan información sobre el procesamiento de consultas de Power Pivot y la salud del servidor en el entorno de la granja.

Servicio de Windows de Analysis Services

El script de esta sección comprueba la instancia de SQL Server Analysis Services en modo de SharePoint. Compruebe que el servicio se está ejecutando.

get-service | select name, displayname, status | where {$_.Name -eq "msolap`$powerpivot"} | format-table -property * -autosize | out-default  

Salida del ejemplo

Name              DisplayName                                Status  
----              -----------                                ------  
MSOLAP$POWERPIVOT SQL Server Analysis Services (POWERPIVOT) Running  

PowerPivotSystemService y PowerPivotEngineService

Los scripts de esta sección comprueban los servicios del sistema Power Pivot para SharePoint. Hay un servicio del sistema para una implementación de SharePoint 2013 y dos servicios para una implementación de SharePoint 2010.

PowerPivotSystemService

Compruebe que el estado está en línea.

Get-PowerPivotSystemService | select typename, status, applications, farm | format-table -property * -autosize | out-default  

Salida del ejemplo

TypeName                                  Status Applications                             Farm  
--------                                  ------ ------------                             ----  
SQL Server PowerPivot Service Application Online {Default PowerPivot Service Application} SPFarm Name=SharePoint_Config_77d8ab0744a34e8aa27c806a2b8c760c  

PowerPivotEngineService

Nota:

Omita este script si usa SharePoint 2013. PowerPivotEngineService no forma parte de una implementación de SharePoint 2013. Si ejecuta el cmdlet Get-PowerPivotEngineService en SharePoint 2013, verá un mensaje de error similar al siguiente. Este mensaje de error se devuelve incluso si ha ejecutado el comando Add-PSSnapin descrito en la sección de requisitos previos de este tema.

El término "Get-PowerPivotEngineService" no se reconoce como el nombre de un cmdlet.

En una implementación de SharePoint 2010, compruebe que el estado es En línea.

Get-PowerPivotEngineService | select typename, status, name, instances, farm | format-table -property * -autosize | out-default   

Salida del ejemplo

TypeName  : SQL Server Analysis Services  
Status    : Online  
Name      : MSOLAP$POWERPIVOT  
Instances : {POWERPIVOT}  
Farm      : SPFarm Name=SharePoint_Config  

Aplicaciones de servicio PowerPivot y servidores proxy

Compruebe que el estado es En línea. La aplicación de Servicios de Excel no usa una base de datos de aplicación de servicio y, por tanto, el cmdlet no devuelve un nombre de base de datos. Anote la base de datos que usa la aplicación de servicio Power Pivot para que pueda comprobar que la base de datos está en línea en la sección base de datos más adelante en este tema.

Aplicaciones de servicio de PowerPivot y Excel

Para una implementación de SharePoint 2010, compruebe que el estado es En línea.

Get-PowerPivotServiceApplication | select typename,name, status, unattendedaccount, applicationpool, farm, database  
Get-SPExcelServiceApplication | select typename, DisplayName, status  

Salida del ejemplo

TypeName          : PowerPivot Service Application  
Name              : PowerPivotServiceApplication1  
Status            : Online  
UnattendedAccount : PowerPivotUnattendedAccount  
ApplicationPool   : SPIisWebServiceApplicationPool Name=sqlbi_serviceapp  
Farm              : SPFarm Name=SharePoint_Config  
Database          : GeminiServiceDatabase Name=PowerPivotServiceApplication1_19648f3f2c944e27acdc6c20aab8487a  
  
TypeName    : Excel Services Application Web Service Application  
DisplayName : Excel Services Application  
Status      : Online  

Grupo de aplicaciones de servicio

Nota:

En primer lugar, el ejemplo de código siguiente devuelve la propiedad applicationpool de la aplicación de servicio Power Pivot predeterminada para SharePoint. El nombre se extrae de la cadena y se utiliza para obtener el estado del objeto del grupo de aplicaciones.

Compruebe que el estado está en línea. Si el estado no es En línea o ve "error http" al examinar el sitio de Power Pivot, compruebe que las credenciales de identidad de los grupos de aplicaciones de IIS siguen siendo correctas. El nombre del grupo de IIS es el valor de la propiedad ID devuelta por el comando Get-SPServiceApplicationPool.

$poolname=[string](Get-PowerPivotServiceApplication | select -property applicationpool)  
$position=$poolname.lastindexof("=")  
$poolname=$poolname.substring($position+1)  
$poolname=$poolname.substring(0,$poolname.length-1)  
Get-SPServiceApplicationPool | select name, status, processaccountname, id | where {$_.Name -eq $poolname} | format-table -property * -autosize | out-default  

Salida del ejemplo

Name                           Status ProcessAccountName Id  
----                           ------ ------------------ -------   
SharePoint Web Services System Online DOMAIN\account     89b50ec3-49e3-4de7-881a-2cec4b8b73ea  

nota El grupo de aplicaciones también se puede comprobar en la página Administración central Administrar aplicaciones de servicio. Haga clic en el nombre de la aplicación de servicio y, a continuación, haga clic en propiedades en la cinta de opciones.

Proxies de aplicación de Power Pivot y Servicios de Excel

Compruebe que el estado está en línea.

Get-SPServiceApplicationProxy |  select typename, status, unattendedaccount, displayname | where {$_.TypeName -like "*powerpivot*" -or $_.TypeName -like "*excel services*"} | format-table -property * -autosize | out-default  

Salida del ejemplo

TypeName                                                 Status UnattendedAccount           DisplayName  
--------                                                 ------ -----------------           -----------  
PowerPivot Service Application Proxy                     Online PowerPivotUnattendedAccount PowerPivotServiceApplication1  
Excel Services Application Web Service Application Proxy Online                             Excel Services Application  

Databases

El script siguiente devuelve el estado de las bases de datos de la aplicación de servicio y de todas las bases de datos de contenido. Compruebe que el estado es En línea.

Get-SPDatabase | select name, status, server, typename | where {$_.TypeName -eq "content database" -or $_.TypeName -like "*Gemini*"} | format-table -property * -autosize | out-default  

Salida del ejemplo

Name                                                                       Status Server                  TypeName   
----                                                                       ------ ------                  --------   
DefaultPowerPivotServiceApplicationDB-38422181-2b68-4ab2-b2bb-9c00c39e5a5e Online SPServer Name=TESTSERVER Microsoft.AnalysisServices.SPAddin.GeminiServiceDatabase  
DefaultWebApplicationDB-f0db1a8e-4c22-408c-b9b9-153bd74b0312               Online TESTSERVER\POWERPIVOT    Content Database   
SharePoint_Admin_3cadf0b098bf49e0bb15abd487f5c684                          Online TESTSERVER\POWERPIVOT    Content Database  
  

Características de SharePoint

Compruebe que las características de sitio, web y granja están en línea.

Get-SPFeature | select displayname, status, scope, farm | where {$_.displayName -like "*powerpivot*"} | format-table -property * -autosize | out-default  

Salida del ejemplo

DisplayName     Status Scope Farm                           
-----------     ------ ----- ----                           
PowerPivotSite  Online  Site SPFarm Name=SharePoint_Config  
PowerPivotAdmin Online   Web SPFarm Name=SharePoint_Config  
PowerPivot      Online  Farm SPFarm Name=SharePoint_Config  

Tareas programadas

Verifique que las tareas programadas estén en línea. Power Pivot EngineService no está instalado en SharePoint 2013, por lo que el script no enumerará los trabajos del temporizador EngineService en una implementación de SharePoint 2013.

Get-SPTimerJob | where {$_.service -like "*power*" -or $_.service -like "*mid*"} | select status, displayname, LastRunTime, service | format-table -property * -autosize | out-default  

Salida del ejemplo

  
      Status DisplayName                                                                          LastRunTime          Service                               
------ -----------                                                                          -----------          -------                               
Online Health Analysis Job (Daily, SQL Server Analysis Services, All Servers)               4/9/2014 12:00:01 AM EngineService Name=MSOLAP$POWERPIVOT  
Online Health Analysis Job (Hourly, SQL Server Analysis Services, All Servers)              4/9/2014 1:00:01 PM  EngineService Name=MSOLAP$POWERPIVOT  
Online Health Analysis Job (Weekly, SQL Server Analysis Services, All Servers)              4/6/2014 12:00:10 AM EngineService Name=MSOLAP$POWERPIVOT  
Online PowerPivot Management Dashboard Processing Timer Job                                 4/8/2014 3:45:38 AM  MidTierService  
Online PowerPivot Health Statistics Collector Timer Job                                     4/9/2014 1:00:12 PM  MidTierService  
Online PowerPivot Data Refresh Timer Job                                                    4/9/2014 1:09:36 PM  MidTierService  
Online Health Analysis Job (Daily, SQL Server PowerPivot Service Application, All Servers)  4/9/2014 12:00:00 AM MidTierService  
Online Health Analysis Job (Daily, SQL Server PowerPivot Service Application, Any Server)   4/9/2014 12:00:00 AM MidTierService  
Online Health Analysis Job (Weekly, SQL Server PowerPivot Service Application, All Servers) 4/6/2014 12:00:03 AM MidTierService  
Online Health Analysis Job (Weekly, SQL Server PowerPivot Service Application, Any Server)  4/6/2014 12:00:03 AM MidTierService  
Online PowerPivot Setup Extension Timer Job                                                 4/1/2014 1:40:31 AM  MidTierService  

Reglas de salud

Hay menos reglas en una implementación de SharePoint 2013. Para obtener una lista completa de reglas para cada entorno de SharePoint y una explicación de cómo usar las reglas, vea Configurar reglas de mantenimiento de PowerPivot.

Get-SPHealthAnalysisRule | select name, enabled, summary | where {$_.summary -like "*power*"}  | format-table -property * -autosize | out-default  

Salida del ejemplo

Name                          Enabled Summary  
----                          ------- -------           
SecondaryLogonHealthRule         True PowerPivot:  Secondary Logon service (seclogon) is disabled  
DataRefreshTimerJobHealthRule    True PowerPivot: The PowerPivot Data Refresh timer job is disabled.  
ASUsageLoadHealthRule            True PowerPivot: The ratio of load events to connections is too high.  
ASMiniDumpHealthRule             True PowerPivot: One or more minidump files were found in the Logs directory, indicating a program crash  
ASUsageCubeRule                  True PowerPivot: Usage data is not getting updated at the expected frequency.  
ASADOMDNETHealthRule             True PowerPivot: ADOMD.NET is not installed on a standalone WFE that is configured for central admin  
MidTierAcctReadPermissionRule    True PowerPivot: MidTier process account should have 'Full Read' permission on all associated SPWebApplications.  

Registros de Windows y ULS

Registro de eventos de Windows

El comando siguiente buscará en el registro de eventos de Windows los eventos relacionados con la instancia de SQL Server Analysis Services en modo de SharePoint. Para obtener información sobre cómo deshabilitar eventos o cambiar el nivel de evento, vea Configurar y ver archivos de registro de SharePoint y registro de diagnóstico (Power Pivot para SharePoint)

Nombre del servicio: MSOLAP$POWERPIVOT

Nombre para mostrar en servicios de Windows: SQL Server Analysis Services (POWERPIVOT)

Get-EventLog "application" | Where-Object {$_.source -like "msolap`$powerpivot*"}  |select timegenerated, entrytype , source, message | format-table -property * -autosize | out-default  

Salida del ejemplo

TimeGenerated           EntryType Source            Message  
-------------           --------- ------            -------  
4/16/2014 1:45:19 PM  Information MSOLAP$POWERPIVOT Software usage metrics are disabled.  
4/16/2014 1:45:19 PM  Information MSOLAP$POWERPIVOT Service started. Microsoft SQL Server Analysis Services 64 Bit Evaluation (x64) RTM 12.0.1997.5.  
4/16/2014 1:45:18 PM  Information MSOLAP$POWERPIVOT The flight recorder was started.  
4/14/2014 6:45:37 PM  Information MSOLAP$POWERPIVOT Software usage metrics are disabled.  

Registro ULS de SharePoint, últimas 48 horas

El comando siguiente devolverá mensajes de Power Pivot desde el registro ULS que se crearon en las últimas 48 horas. Ajuste el parámetro addhours según sus necesidades.

Get-SPLogEvent -starttime(get-date).addhours(-48) | Where-Object {$_.Area -eq "powerpivot service" -and $_.level -eq "high"} | select timestamp, area, category, eventid,level, message| format-table -property * -autosize | out-default  

La siguiente variación del comando solo devuelve eventos de registro para la categoría de actualización de datos .

Get-SPLogEvent -starttime(get-date).addhours(-48) | Where-Object {$_.category -eq "data refresh" -and $_.level -eq "high"} | select timestamp, area, category, eventid, level, correlation, message  

Salida del ejemplo

Timestamp   : 4/14/2014 7:15:01 PM  
Area        : PowerPivot Service  
Category    : Data Refresh  
EventID     : 43  
Level       : High  
Correlation : 5755879c-7cab-e097-8f80-f27895d44a77  
Message     : The following error occured when working with the service application, Default PowerPivot Service Application. Skipping the service application..  
  
Timestamp   : 4/14/2014 7:15:02 PM  
Area        : PowerPivot Service  
Category    : Data Refresh  
EventID     : 99  
Level       : High  
Correlation : 5755879c-7cab-e097-8f80-f27895d44a77  
Message     : EXCEPTION: System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:47.0625313. Increase the timeout value passed to   
              the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.   
              ---> System.TimeoutException: The HTTP request to 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas' has exceeded the   
              allotted timeout of 00:00:54.5930000. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The   
              operation has timed out     at System.Net.HttpWebRequest.GetResponse()     at   
              System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout...  

Proveedor MSOLAP

Compruebe el proveedor MSOLAP. SQL Server 2012 (11.x) y SQL Server 2014 (12.x) Power Pivot requieren MSOLAP.5.

$excelApp=Get-SPExcelServiceApplication  
get-spexceldataprovider -ExcelServiceApplication $excelApp |select providerid,providertype,description | where {$_.providerid -like "msolap*" } | format-table -property * -autosize | out-default  

Salida del ejemplo

ProviderId ProviderType Description  
---------- ------------ -----------  
MSOLAP     Oledb        Microsoft OLE DB Provider for OLAP Services       
MSOLAP.3   Oledb        Microsoft OLE DB Provider for OLAP Services 9.0   
MSOLAP.4   Oledb        Microsoft OLE DB Provider for OLAP Services 10.0  
MSOLAP.5   Oledb        Microsoft OLE DB Provider for OLAP Services 11.0  

biblioteca cliente de ADOMD.Net

get-wmiobject -class win32_product | Where-Object {$_.name -like "*ado*"} | select name, version, vendor | format-table -property * -autosize | out-default  

Salida del ejemplo

name                                                  version      vendor  
----                                                  -------      ------  
Microsoft SQL Server 2008 Analysis Services ADOMD.NET 10.1.2531.0  Microsoft Corporation  
Microsoft SQL Server 2005 Analysis Services ADOMD.NET 9.00.1399.06 Microsoft Corporation  

Reglas de recopilación de datos de salud

Compruebe que el estado está en línea y habilitado es True.

get-spusagedefinition | select name, status, enabled, tablename, DaysToKeepDetailedData | where {$_.name -like "powerpivot*"} | format-table -property * -autosize | out-default  

Salida del ejemplo

Name                         Status Enabled TableName                   DaysToKeepDetailedData  
----                         ------ ------- ---------                   ----------------------  
PowerPivot Connections       OnlineTrue AnalysisServicesConnections  14  
PowerPivot Load Data Usage   Online    True AnalysisServicesLoads                           14  
PowerPivot Query Usage       Online    True AnalysisServicesRequests                        14  
PowerPivot Unload Data Usage Online    True AnalysisServicesUnloads                         14  

Para obtener más información, consulte Recopilación de datos de uso de Power Pivot.

Solutions

Si los otros componentes están en línea, puede omitir la comprobación de las soluciones. Si, sin embargo, faltan las reglas de salud, verifique que existan las dos soluciones y asegúrese de que las dos soluciones de Power Pivot estén en línea e implementadas.

get-spsolution | select name, status, deployed, DeploymentState, DeployedServers | where {$_.Name -like "*powerpivot*"} | format-table -property * -autosize | out-default  

Salida de ejemplo de SharePoint 2013

Name                                 Status Deployed        DeploymentState DeployedServers  
----                                 ------ --------        --------------- ---------------  
powerpivotfarm14solution.wsp         Online     True         GlobalDeployed {UETESTA00}  
powerpivotfarmsolution.wsp           Online     True         GlobalDeployed {UETESTA00}  
powerpivotwebapplicationsolution.wsp Online     True WebApplicationDeployed {UETESTA00}  

Salida de ejemplo de SharePoint 2010

Name                 Status Deployed        DeploymentState DeployedServers   
----                 ------ --------        --------------- ---------------   
powerpivotfarm.wsp   Online     True         GlobalDeployed {uesql11spoint2}  
powerpivotwebapp.wsp Online     True WebApplicationDeployed {uesql11spoint2}  

Para obtener más información sobre cómo implementar soluciones de SharePoint, vea Deploy solution packages (SharePoint Server 2010).

Pasos de comprobación manual

En esta sección se describen los pasos de comprobación que no se pueden completar con cmdlets de PowerShell.

Actualización de datos programada: Configure la programación de actualización en un libro de trabajo para también actualizarse lo antes posible. Para obtener más información, vea la sección "Comprobar actualización de datos" de Programar actualización de datos y orígenes de datos que no admiten la autenticación de Windows (Power Pivot para SharePoint).

Más recursos

Cmdlets de administración del servidor web (IIS) en Windows PowerShell.

PowerShell para comprobar los servicios, los sitios de IIS y el estado del grupo de aplicaciones en SharePoint.

Referencia de Windows PowerShell para SharePoint 2013

Referencia de Windows PowerShell para SharePoint Foundation 2010

Administrar Servicios de Excel con Windows PowerShell (SharePoint Server 2010)

Ver y leer archivos de registro de instalación de SQL Server

Uso del cmdlet Get-EvenLog

Script completo de PowerShell

El siguiente script contiene todos los comandos de las secciones anteriores. El script ejecuta los comandos en el mismo orden que se presentan en este tema. El script contiene algunas variaciones opcionales de los comandos indicados en este tema en caso de que necesite filtrado adicional. Las variaciones se desactivan con un símbolo de comentario (#). El script también incluye algunas instrucciones para verificar el modo SharePoint de los Servicios de Informes. Las sentencias de Reporting Services están deshabilitadas con un carácter de comentario (#).

# This script audits services related to PowerPivot for SharePoint  
$starttime=Get-Date  
write-host -foregroundcolor DarkGray StartTime $starttime   
  
Write-Host  "Import the SharePoint PowerShell snappin"  
Add-PSSnapin Microsoft.Sharepoint.Powershell -EA 0  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "Analysis Services Windows Service"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
get-service | select name, displayname, status | where {$_.Name -eq "msolap`$powerpivot"} | format-table -property * -autosize | out-default  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "PowerPivotEngineService and PowerPivotSystemService"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
  
Get-PowerPivotSystemService | select typename, status, applications, farm | format-table -property * -autosize | out-default  
# If needed, you can run the following to compare job definitions specific to the service against the results of the timer job definition section  
#Get-PowerPivotSystemService | select -ExpandProperty jobdefinitions | select displayname, schedule, service | format-table -property * -autosize | out-default  
  
Get-PowerPivotEngineService | select typename, status, name, instances, farm | format-table -property * -autosize | out-default  
# If needed, you can run the following to compare job definitions specific to the service against the results of the timer job definition section  
#Get-PowerPivotEngineService | select -ExpandProperty jobdefinitions | select displayname, schedule, service | format-table -property * -autosize | out-default  
  
#Write-Host ""  
#Write-Host -ForegroundColor Green "Service Instances - optional if you want to associate services with the server"  
#Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
#Get-SPServiceInstance | select typename, status, server, service, instance | where {$_.TypeName -like "*powerpivot*" -or $_.TypeName -like "*excel*" -or $_.TypeName -like "*Analysis Services*"} | format-table -property * -autosize | out-default  
#Get-PowerPivotEngineServiceInstance  | select typename, ASServername, status, server, service, instance  
#Get-PowerPivotSystemServiceInstance  | select typename, ASSServerName, status, server, service, instance  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "PowerPivot And Excel Service Applications"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-PowerPivotServiceApplication | select typename,name, status, unattendedaccount, applicationpool, farm, database   
Get-SPExcelServiceApplication | select typename,  DisplayName, status   
  
#Write-Host ""  
Write-Host -ForegroundColor Green "PowerPivot Service Application pool"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
# the following assumes there is only 1 PowerPivot Service Application, and returns that applicaitons pool name.  if you have more than one, use the 2nd version  
$poolname=[string](Get-PowerPivotServiceApplication | select -property applicationpool)  
$position=$poolname.lastindexof("=")  
$poolname=$poolname.substring($position+1)  
$poolname=$poolname.substring(0,$poolname.length-1)  
Get-SPServiceApplicationPool | select name, status, processaccountname, id | where {$_.Name -eq $poolname} | format-table -property * -autosize | out-default  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "PowerPivot and Excel Service Application Proxy"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-SPServiceApplicationProxy |  select typename, status, unattendedaccount, displayname | where {$_.TypeName -like "*powerpivot*" -or $_.TypeName -like "*excel services*"} | format-table -property * -autosize | out-default  
#Get-SPServiceApplicationProxy |  select typename, status, unattendedaccount, displayname | where {$_.TypeName -like "*powerpivot*" -or $_.TypeName -like "*Reporting Services*" -or $_.TypeName -like "*excel services*"} | format-table -property * -autosize | out-default  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "DATABASES"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-SPDatabase | select name, status, server, typename | where {$_.TypeName -eq "content database" -or $_.TypeName -like "*Gemini*"} | format-table -property * -autosize | out-default  
#Get-SPDatabase | select name, status, server, typename | where {$_.TypeName -eq "content database" -or $_.TypeName -like "*Gemini*" -or $_.TypeName -like "*ReportingServices*"}   
  
#Write-Host ""  
Write-Host -ForegroundColor Green "features"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-SPFeature | select displayname, status, scope, farm| where {$_.displayName -like "*powerpivot*"} | format-table -property * -autosize | out-default  
#Get-SPFeature | select displayname, status, scope, farm | where {$_.displayName -like "*powerpivot*" -or $_.displayName -like "*ReportServer*"}  | format-table -property * -autosize | out-default  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "Timer Jobs (Job Definitions) -- list is the same as seen in the 'Review timer job definitions' section of the management dashboard"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-SPTimerJob | where {$_.service -like "*power*" -or $_.service -like "*mid*"} | select status, displayname, LastRunTime, service | format-table -property * -autosize | out-default  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "health rules"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-SPHealthAnalysisRule | select name, enabled, summary | where {$_.summary -like "*power*"}  | format-table -property * -autosize | out-default  
  
$time=Get-Date  
write-host -foregroundcolor DarkGray StartTime $starttime   
write-host -foregroundcolor DarkGray EndTime $time  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "Windows Event Log data MSSQL$POWERPIVOT and "  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-EventLog "application" | Where-Object {$_.source -like "msolap`$powerpivot*"}  |select timegenerated, entrytype , source, message | format-table -property * -autosize | out-default  
#The following is the same command but with the Inforamtion events filtered out.  
#Get-EventLog "application" | Where-Object {$_.source -like "msolap`$powerpivot*" -and ($_.entrytype -match "error" -or $_.entrytype -match "critical" -or $_.entrytype -match "warning")}  |select timegenerated, entrytype , source, message | format-table -property * -autosize | out-default  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "ULS Log data"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
Get-SPLogEvent -starttime(get-date).addhours(-48) | Where-Object {$_.Area -eq "powerpivot service" -and $_.level -eq "high"} | select timestamp, area, category, eventid,level, correlation, message| format-table -property * -autosize | out-default  
#the following example filters for the category 'data refresh'  
#Get-SPLogEvent -starttime(get-date).addhours(-48) | Where-Object {$_.category -eq "data refresh" -and $_.level -eq "high"} | select timestamp, area, category, eventid, level, correlation, message  
  
$time=Get-Date  
write-host -foregroundcolor DarkGray StartTime $starttime   
write-host -foregroundcolor DarkGray EndTime $time  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "MSOLAP data provider for Excel Servivces, service application"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
$excelApp=Get-SPExcelServiceApplication  
get-spexceldataprovider -ExcelServiceApplication $excelApp |select providerid,providertype,description | where {$_.providerid -like "msolap*" } | format-table -property * -autosize | out-default  
  
Write-Host -ForegroundColor Green "ADOMD.net client library"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
get-wmiobject -class win32_product | Where-Object {$_.name -like "*ado*"} | select name, version, vendor | format-table -property * -autosize | out-default  
  
#Write-Host ""  
Write-Host -ForegroundColor Green "Usage Data Rules"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
get-spusagedefinition | select name, status, enabled, tablename, DaysToKeepDetailedData | where {$_.name -like "powerpivot*"} | format-table -property * -autosize | out-default  
  
Write-Host -ForegroundColor Green "Solutions"  
Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"  
get-spsolution | select name, status, deployed, DeploymentState, DeployedServers | where {$_.Name -like "*powerpivot*"} | format-table -property * -autosize | out-default  
  
$time=Get-Date  
write-host -foregroundcolor DarkGray StartTime $starttime   
write-host -foregroundcolor DarkGray EndTime $time