适用于:
SQL Server 2019 及更早版本的 Analysis Services
Azure Analysis Services
Fabric/Power BI Premium
重要
SQL Server 2017 Analysis Services 中弃用了数据挖掘,现已在 SQL Server 2022 Analysis Services 中停止使用。 文档不会更新为已弃用和已停用的功能。 若要了解详细信息,请参阅 Analysis Services 向后兼容性。
没有任何 PowerPivot for SharePoint 的安装或恢复操作是在没有经过坚实的验证测试确认服务和数据正常运行的情况下就算完成的。 本文介绍如何使用 Windows PowerShell 执行这些步骤。 我们将每个步骤放入其自己的部分,以便你可以直接执行特定任务。 例如,若要计划服务应用程序及其内容数据库的维护或备份,请在本主题的 数据库 部分中运行脚本,以验证这些服务应用程序及其内容数据库名称。
主题底部包含完整的 PowerShell 脚本。 使用完整脚本作为起点,生成用于审核完整 Power Pivot for SharePoint 部署的自定义脚本。
准备 PowerShell 环境
此部分的步骤用于配置 PowerShell 环境。 这些步骤可能不需要执行,具体取决于脚本环境当前的配置方式。
PowerShell 权限
使用 管理权限打开 Powershell 窗口或 PowerShell ISE(集成脚本环境)。 如果在运行命令时没有管理权限,则会看到如下所示的错误消息:
Get-SPLogEvent:需要拥有计算机 管理员权限 才能运行此 cmdlet。
SharePoint 和 Power Pivot for SharePoint 模块
如果在运行 SharePoint 相关 cmdlet 时看到类似于以下内容的错误消息,请运行 Add-PSSnapin 命令:
术语“Get-PowerPivotSystemService” 无法识别为 cmdlet、函数、脚本文件或可运行的程序的名称。 检查名称的拼写,或者是否包含路径,验证路径是否正确,然后重试。
Add-PSSnapin Microsoft.Sharepoint.Powershell -EA 0
Windows PowerShell
**
,您可以选择在“中央管理”中使用 Power Pivot 管理仪表板验证大部分组件。 若要在管理中心中打开仪表板,请单击“常规应用程序设置”,然后单击 Power Pivot 中的“管理仪表板”。 有关仪表板的详细信息,请参阅 Power Pivot 管理仪表板和使用情况数据。
症状和推荐的措施
下表列出了症状或问题以及本主题的建议部分,以帮助你解决问题。
| 症状 | 请参阅相关章节 |
|---|---|
| 数据刷新未运行 | 请参阅 计时器作业 部分,并验证 联机 Power Pivot 数据刷新计时器作业 是否处于联机状态。 |
| 管理仪表板数据已过时 | 请参阅 计时器作业 部分,并验证 管理仪表板处理计时器作业 是否处于联机状态。 |
| 管理仪表板的某些部分 | 如果将 Power Pivot for SharePoint 安装到具有管理中心拓扑的服务器场中,如果没有 Excel Services 或 Power Pivot for SharePoint,则必须下载并安装Microsoft ADOMD.NET 客户端库(如果想要在 Power Pivot 管理仪表板中完全访问内置报表)。 仪表板中的某些报表使用 ADOMD.NET 访问内部数据,这些数据为服务器场中 Power Pivot 查询处理和服务器运行状况提供报告数据。 |
Analysis Services 的 Windows 服务
本节中的脚本验证 SharePoint 模式下的 SQL Server Analysis Services 实例。 验证服务是否 正在运行。
get-service | select name, displayname, status | where {$_.Name -eq "msolap`$powerpivot"} | format-table -property * -autosize | out-default
示例输出
Name DisplayName Status
---- ----------- ------
MSOLAP$POWERPIVOT SQL Server Analysis Services (POWERPIVOT) Running
PowerPivotSystemService 和 PowerPivotEngineService
本节中的脚本验证 Power Pivot for SharePoint 系统服务。 SharePoint 2013 部署有一个系统服务,一个 SharePoint 2010 部署有两个服务。
PowerPivotSystemService
验证状态是否为 联机状态。
Get-PowerPivotSystemService | select typename, status, applications, farm | format-table -property * -autosize | out-default
示例输出
TypeName Status Applications Farm
-------- ------ ------------ ----
SQL Server PowerPivot Service Application Online {Default PowerPivot Service Application} SPFarm Name=SharePoint_Config_77d8ab0744a34e8aa27c806a2b8c760c
PowerPivotEngineService
注释
如果使用 SharePoint 2013,请跳过此脚本。 PowerPivotEngineService 不是 SharePoint 2013 部署的一部分。 如果在 SharePoint 2013 上运行 Get-PowerPivotEngineService cmdlet,则会看到如下所示的错误消息。 即使已运行本主题先决条件部分中所述的 Add-PSSnapin 命令,也会返回此错误消息。
术语“Get-PowerPivotEngineService”无法被识别为 cmdlet 的名称
在 SharePoint 2010 部署中,验证状态是否为 Online。
Get-PowerPivotEngineService | select typename, status, name, instances, farm | format-table -property * -autosize | out-default
示例输出
TypeName : SQL Server Analysis Services
Status : Online
Name : MSOLAP$POWERPIVOT
Instances : {POWERPIVOT}
Farm : SPFarm Name=SharePoint_Config
Power Pivot 服务应用程序和代理
验证状态是否为 “联机”。 Excel Services 应用程序不使用服务应用程序数据库,因此 cmdlet 不返回数据库名称。 请注意 Power Pivot 服务应用程序使用的数据库,以便您可以在本主题后面的数据库部分验证该数据库是否处于在线状态。
Power Pivot 和 Excel 服务应用程序
对于 SharePoint 2010 部署,请验证状态为 “联机”。
Get-PowerPivotServiceApplication | select typename,name, status, unattendedaccount, applicationpool, farm, database
Get-SPExcelServiceApplication | select typename, DisplayName, status
示例输出
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
服务应用程序池
注释
下面的代码示例首先返回默认 Power Pivot for SharePoint 服务应用程序的 applicationpool 属性。 该名称从字符串中解析,用于获取应用程序池对象的状态。
验证状态是否为 联机状态。 如果状态不是联机,或者在浏览 Power Pivot 站点时看到“http 错误”,请验证 IIS 应用程序池中的标识凭据是否仍然正确。 IIS 池名称将是 Get-SPServiceApplicationPool 命令返回的 ID 属性的值。
$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
示例输出
Name Status ProcessAccountName Id
---- ------ ------------------ -------
SharePoint Web Services System Online DOMAIN\account 89b50ec3-49e3-4de7-881a-2cec4b8b73ea
应用程序池也可以在中央管理网站的管理服务应用程序页面中进行验证。 单击服务应用程序的名称,然后单击功能区中的 属性 。
Power Pivot 和 Excel 服务应用代理
验证状态是否为 联机状态。
Get-SPServiceApplicationProxy | select typename, status, unattendedaccount, displayname | where {$_.TypeName -like "*powerpivot*" -or $_.TypeName -like "*excel services*"} | format-table -property * -autosize | out-default
示例输出
TypeName Status UnattendedAccount DisplayName
-------- ------ ----------------- -----------
PowerPivot Service Application Proxy Online PowerPivotUnattendedAccount PowerPivotServiceApplication1
Excel Services Application Web Service Application Proxy Online Excel Services Application
Databases
以下脚本返回服务应用程序数据库和所有内容数据库的状态。 验证状态是否为 “联机”。
Get-SPDatabase | select name, status, server, typename | where {$_.TypeName -eq "content database" -or $_.TypeName -like "*Gemini*"} | format-table -property * -autosize | out-default
示例输出
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
SharePoint 功能
验证网站、Web 和场功能是否处于联机状态。
Get-SPFeature | select displayname, status, scope, farm | where {$_.displayName -like "*powerpivot*"} | format-table -property * -autosize | out-default
示例输出
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
定时任务
验证定时任务是否在线。 Power Pivot EngineService 未安装在 SharePoint 2013 上,因此脚本不会在 SharePoint 2013 部署中列出 EngineService 计时器作业。
Get-SPTimerJob | where {$_.service -like "*power*" -or $_.service -like "*mid*"} | select status, displayname, LastRunTime, service | format-table -property * -autosize | out-default
示例输出
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
健康规则
SharePoint 2013 部署中的规则较少。 有关每个 SharePoint 环境的规则的完整列表以及有关如何使用规则的说明,请参阅 “配置 Power Pivot 运行状况规则”。
Get-SPHealthAnalysisRule | select name, enabled, summary | where {$_.summary -like "*power*"} | format-table -property * -autosize | out-default
示例输出
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.
Windows 和 ULS 日志
Windows 事件日志
以下命令将在 Windows 事件日志中搜索与 SharePoint 模式下 SQL Server Analysis Services 实例相关的事件。 有关禁用事件或更改事件级别的信息,请参阅 “配置和查看 SharePoint 日志文件和诊断日志记录”(Power Pivot for SharePoint)
服务名称: MSOLAP$POWERPIVOT
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
示例输出
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.
SharePoint ULS 日志,过去 48 小时
以下命令将从过去 48 小时内创建的 ULS 日志中返回 Power Pivot 消息。 根据需要调整 addhours 参数的数值。
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
命令的以下变体仅返回 数据刷新 类别的日志事件。
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
示例输出
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...
MSOLAP 提供程序
验证 MSOLAP 提供程序。 SQL Server 2012 (11.x) 和 SQL Server 2014 (12.x) Power Pivot 需要 MSOLAP.5。
$excelApp=Get-SPExcelServiceApplication
get-spexceldataprovider -ExcelServiceApplication $excelApp |select providerid,providertype,description | where {$_.providerid -like "msolap*" } | format-table -property * -autosize | out-default
示例输出
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
ADOMD.Net 客户端库
get-wmiobject -class win32_product | Where-Object {$_.name -like "*ado*"} | select name, version, vendor | format-table -property * -autosize | out-default
示例输出
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
健康数据收集规则
验证 状态 是否为“在线”,已启用 是否为 True。
get-spusagedefinition | select name, status, enabled, tablename, DaysToKeepDetailedData | where {$_.name -like "powerpivot*"} | format-table -property * -autosize | out-default
示例输出
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
有关详细信息,请参阅 Power Pivot 使用情况数据收集。
Solutions
如果其他组件处于联机状态,则可以跳过验证解决方案。 ** 如果缺少健康规则,请验证两个解决方案是否存在,并确认两个 Power Pivot 解决方案是在线的和已部署的。
get-spsolution | select name, status, deployed, DeploymentState, DeployedServers | where {$_.Name -like "*powerpivot*"} | format-table -property * -autosize | out-default
示例输出 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}
示例输出 SharePoint 2010
Name Status Deployed DeploymentState DeployedServers
---- ------ -------- --------------- ---------------
powerpivotfarm.wsp Online True GlobalDeployed {uesql11spoint2}
powerpivotwebapp.wsp Online True WebApplicationDeployed {uesql11spoint2}
有关如何部署 SharePoint 解决方案的详细信息,请参阅“部署解决方案包”(SharePoint Server 2010)。
手动验证步骤
本部分介绍无法使用 PowerShell cmdlet 完成的验证步骤。
计划的数据刷新: 配置工作簿的刷新计划,以便 尽快刷新。 有关详细信息,请参阅 计划数据刷新和不支持 Windows 身份验证的数据源(Power Pivot for SharePoint)的“验证数据刷新”部分。
更多资源
Windows PowerShell 中的 Web 服务器(IIS)管理 Cmdlet。
用于检查 SharePoint 中的服务、IIS 站点和应用程序池状态的 PowerShell。
Windows PowerShell for SharePoint 2013 参考指南
Windows PowerShell for SharePoint Foundation 2010 参考指南
使用 Windows PowerShell 管理 Excel Services (SharePoint Server 2010)
完整 PowerShell 脚本
以下脚本包含前面部分的所有命令。 该脚本按本主题中所示的顺序运行命令。 此脚本包含本主题中记录的命令的一些可选变体,以防需要其他筛选。 使用注释字符(#)禁用变体。 该脚本还包括用于验证 Reporting Services SharePoint 模式的一些语句。 Reporting Services 语句通过使用注释字符(#)来禁用。
# 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