Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

Publishing SCOM 2012 dashboards to SharePoint

Publishing SCOM 2012 dashboards to SharePoint

  • Comments 4
  • Likes

 

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:

 

image

 

Next we will run C:\bin\shpt\install-OperationsManager-DashboardViewer.ps1 from an elevated SharePoint Management Shell:

image

image

 

But look what happened on mine:

image

 

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

Add-PSSnapin Microsoft.SharePoint.PowerShell

Now we can run the script with success:

 

 

image

 

 

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:

image

 

 

 

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:

image

Click Save. 

 

 

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:

http://www.scom2k7.com/how-to-view-scom-2012-dashboards-in-sharepoint-2010/

http://blogs.technet.com/b/momteam/archive/2011/09/27/setting-up-the-operations-manager-web-part.aspx

http://thoughtsonopsmgr.blogspot.com/2013/03/om12-operations-manager-web-part.html

Comments
  • Thanks for this Kevin, we target Sharepoint Page viewer web parts at the dashboard views we've set up in a central SCOM dashboard admin site, one issue we have with this is that the page view includes the Sharepoint action pane on the left-hand side of the embedded view as well as the top banner, any idea how to remove these so we can just get a clean view of the dashboard? Thanks!

  • Good instructions! I have one question, we are using SharePoint 2010 Foundation, which doesn't provide the ability to use Shared Credentials, and we do not want to give 'everyone' an OpsMgr Role. How would we get around this?

  • Thanks Kevin,
    i have already an error in the last stp when i try to edit the web part: "InitializeError -2104 une erreur s'est produite"

  • Thanks, will this work on sharepoint 2013 as well?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs