Not sure you have read the instructions on how to use these dashboards. You can’t just run native PowerShell and call it a day.
You need to use the scriptcontext and return a scriptcollection: http://blogs.technet.com/b/stefan_stranger/archive/2014/04/28/new-powershell-grid-widget-walkthrough.aspx http://social.technet.microsoft.com/wiki/contents/articles/24595.operations-manager-dashboard-script-widgets.aspx From: [email protected] [mailto:[email protected]] On Behalf Of Blake Wilson Sent: Thursday, August 20, 2015 12:36 PM To: [email protected] Subject: [msmom] RE: PowerShell Widget View My powershell was wrong, it should read like this (although, I still don’t get any results) Import-Module OperationsManager New-SCOMManagementGroupConnection “FQDN OF MS” (get-SCOMagent | where {$_.PrimaryManagementServerName -eq “FQDN OF THE MS/GW”} | ft name) Thanks, Blake From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Blake Wilson Sent: Thursday, August 20, 2015 12:03 PM To: [email protected]<mailto:[email protected]> Subject: [msmom] PowerShell Widget View I’m trying to create a view in OpsMgr 2012 R2 that uses the PowerShell Grid widget. What we’re going after seems simple enough; we want to show what agents report to a specific MS or GW. I’m using the powershell script below, but I’m not getting ANY results in the widget. Import-Module OperationsManager New-SCOMManagementGroupConnection “MANAGEMENT GROUP NAME” (get-SCOMagent | where {$_.PrimaryManagementServerName -eq “FQDN OF THE MS”} | ft name) Any suggestions? Thanks, Blake
