In case you have been playing with SharePoint 2010 IW Demo VM you might bumped into this error:
The query could not complete because the following items are not in a PerformancePoint trusted location…
The solution for this problem is simple, you just need to add all PerformancePoint locations to the trusted list in PerformancePoint service application. I usually use IW Demo machine to do demos and sometimes during presentation a customer might request you to present something (like PerformancePoint) that was not on your demo agenda.
To make sure the errors like the one above do not appear in front of your customer I wrote a simple scripte that will automatically add all existing site collection as trusted PerformancePoint locations. Please note that this is for demo purposes only and you should not execute this in production enviroment before consulting your system adminstrator.
Here is the script:
# check to ensure Microsoft.SharePoint.PowerShell is loaded $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'} if ($snapin -eq $null) { Write-Host "Loading SharePoint Powershell Snapin" Add-PSSnapin "Microsoft.SharePoint.Powershell" } $ppApp = Get-SPPerformancePointServiceApplication $ppApp | Get-SPPerformancePointServiceApplicationTrustedLocation | Where {$_.RepositoryLocationType -eq "SiteCollection"}| Remove-SPPerformancePointServiceApplicationTrustedLocation Get-SPSite -Limit All | Where{$_.Url -notlike "*/personal/*" -and $_.Url -notlike "*/my"} | ForEach-Object { $ppApp | New-SPPerformancePointServiceApplicationTrustedLocation -Url $_.Url -TrustedLocationType Content -Type SiteCollection $ppApp | New-SPPerformancePointServiceApplicationTrustedLocation -Url $_.Url -TrustedLocationType DataSource -Type SiteCollection } $ppApp | Get-SPPerformancePointServiceApplicationTrustedLocation
Few notes:
- This script first deletes all trusted locations of SiteCollection type
- It adds all site collections in your farm excluding those that have my or personal as part of their URL (MySites)