SCOM 2016 dashboard view to display resource utilization of all servers

Nizwan Sultan P N 21 Reputation points
2021-05-19T06:51:42.027+00:00

Hi Guys,

I have been trying for weeks to create a SCOM custom dashboard view to display current CPU%, RAM%, Network%, C drive %, D drive % in one single view. SCOM has the limitation to display only the "Top 20" resource utilization but in my case I have more than 60+ server and all of them needs to be displayed. I was suggested that this could be possible using a PowerShell dashboard and I have done too many research to find a script which could help me based on my requirement but unfortunately could not find any blogs or post which is relevant to my need. Could someone please help me out with my request?

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,413 questions
{count} votes

Accepted answer
  1. AlexZhu-MSFT 5,551 Reputation points Microsoft Vendor
    2021-07-06T05:05:27.97+00:00

    Hi,

    Thank you for asking this. For a quick lab test, I've created a dashboard view with two grid columns and add the PowerShell Grid Widget for one of them. And the powershell is something like this.

    $class = Get-SCOMClass -Name Microsoft.Windows.Computer  
    $computers = Get-SCOMClassInstance -Class $class  
    $i=1  
    foreach ($computer in $computers)  
    {  
        $cpu_usage = (Get-WmiObject -ComputerName $computer -Class win32_processor -ErrorAction silentlycontinue | Measure-Object -Property LoadPercentage -Average | Select-Object Average).Average.ToString()+"%"  
        $dataObject=$ScriptContext.CreateFromObject($computer,"Id=Id,HealthState=HealthState,DisplayName=DisplayName",$null)  
        $dataObject["Index"]=$i  
        $dataObject["CPU_Usage"]=$cpu_usage  
        $ScriptContext.ReturnCollection.Add($dataObject)  
        $i++  
    }  
      
    

    Note: Get-WmiObject need remote administration permission on target computer. We can set -ErrorAction Stop to see if any errors. If 0x800706BA error appears, check this article:
    https://www.vspbreda.nl/nl/server-os/server-2008/error-get-wmiobject-the-rpc-server-is-unavailable-exception-from-hresult-0x800706ba/
    Note: the above link is not from MS, just for your reference.

    After that, the output is like this:

    111986-scom-pwershell-dashboard-01.png

    For more information about dashboard scrip widget, we may refer to:
    https://social.technet.microsoft.com/wiki/contents/articles/24595.operations-manager-dashboard-script-widgets.aspx

    Alex
    If the response is helpful, please click "Accept Answer" and upvote it.


5 additional answers

Sort by: Most helpful
  1. Nizwan Sultan P N 21 Reputation points
    2021-07-05T04:38:12.793+00:00

    Hi Guys,

    Thanks for all your response. I got held up with something else and wasn't able to respond to your suggestions.
    I tried to query the logical disk details using powershell script for sample on operations manager shell and was able to get the data but when using the same script on the SCOM dashboard it does not fetch any details. it keeps loading with no response.

    @AlexZhu-MSFT : Hi Alex.. I found few post of yours which I could relate with my request and thought you might be able to help me on this ?

    0 comments No comments