One of the features in OpsMgr2012 is the ability to create rich dashboards, and then publish them to a SharePoint site.
This is covered in the product documentation here: http://technet.microsoft.com/en-us/library/hh212924.aspx
I recently ran into a problem setting this up for a customer – so thought I’d talk about that here for a moment.
First thing is to log on to the SharePoint 2012 server as a SharePoint Administrator, and copy the following two files from the SCOM setup media (\Setup\AMD64\SharePoint) to a local directory on the SharePoint server:
Next we will run C:\bin\shpt\install-OperationsManager-DashboardViewer.ps1 from an elevated SharePoint Management Shell:
But look what happened on mine:
PSsnapin Microsoft.SharePoint.PowerShell is loaded
Get-SPFarm : Microsoft SharePoint is not supported with version 4.0.30319.1 of
the Microsoft .Net Runtime.
At C:\bin\shpt\install-OperationsManager-DashboardViewer.ps1:74 char:9
+ $farm = Get-SPFarm
+ CategoryInfo : InvalidData: (Microsoft.Share...SpCmdletGetFarm:
SpCmdletGetFarm) [Get-SPFarm], PlatformNotSupportedException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SpCmdletGetFarm
Cannot index into a null array.
At C:\bin\shpt\install-OperationsManager-DashboardViewer.ps1:75 char:1
+ $sol = $farm.Solutions[$solutionID]
+ CategoryInfo : InvalidOperation: (:) , RuntimeException
+ FullyQualifiedErrorId : NullArray
This error is caused because I installed Windows Management Framework (WMF) 3.0 on my server, which also upgrades PowerShell to 3.0.
The workaround for this – is to launch a Powershell 2.0 session – and then add the SharePoint snapin:
From an elevated command prompt – type:
powershell.exe -Version 2.0
Now we can run the script with success:
Next up – we need to activate the web part.
On the SharePoint site – Site Actions > Site Settings > Site Collection Administration > Site Collection Features
Make sure the OpsMgr Dashboard Web Part is Active:
To add/configure a dashboard – open the SharePoint Central Administration site.
Site Actions > View All Site Content > Lists > click Operations Manager Web Console Environments
Add New Item > give the dashboard a title, and the URL of your SCOM web console:
Now we can add a dashboard to a page on SharePoint. On your SharePoint site page:
Site Actions > New Page
Give our new dashboard view a name, and click Create
Below “Editing tools” click Insert > Web Part
Select “Microsoft System Center” and select “Operations Manager Dashboard Viewer Web Part” and click Add.
On the upper right, click the down arrow and pick “Edit Web Part”
Choose the correct environment, paste in a URL from the web console for a dashboard, and give the page an appropriate title.
On the menu bar – click Save and Close.
Ready to go!
Additional reading and resources: