Direct .net call instead of slow Get-ScomClassInstance RRS feed

  • Question

  • Hi all

    Somewhere in internets i saw solution to use .net commands instead of scom powershell cmdlets and it was ~3 times faster

    Maybe someone saw it ? Or any examples ?

    Many hhanks


    Saturday, October 19, 2019 9:09 AM


All replies

  • Hi,

    I would say that the Operations Manager Shell is very fast and efficient, I don't know where you've seen/read anything else.

    Unlike traditional command-line environments that work by returning text results to the end user or routing ("piping") text to different command-line utilities, Windows PowerShell manipulates Microsoft .NET Framework objects directly. This provides a more robust and efficient mechanism for interacting with the system.

    Best regards,

    Blog: LinkedIn:

    Saturday, October 19, 2019 10:26 AM
  • Hi,


    Based as I know, The Operations Manager Shell is built on Windows PowerShell. Windows PowerShell is based on the .NET Framework. PowerShell Core, on the other hand, is based on the .NET Core Runtime instead. Many improvements of performance across PowerShell, including in startup time, various built-in cmdlets, and interaction with native binaries are made in PowerShell core. Meanwhile, there are some Performance improvements in .Net Core 3.0. The following article for your reference:



    Hope it can help.


    Best regards.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Monday, October 21, 2019 1:19 AM
  • The get-scomclassinstance cmdlet uses the SDK service at the following method:

    $mg = get-scommanagementgroup


    There are limited examples of talking via dotnet methods that are faster, but ultimately the information you are working with comes from / goes to the opsDB.

    Since you're ultimately talking to the database in this example, there won't be any available .net performance improvements beyond what is available through the SDK service (via the $mg variable above).

    Please try and find the article you mentioned, without that I would first check if theres another method signature to use thats more efficient.

    Monday, October 21, 2019 2:22 AM
  • Maybe there are sql command to get instance of class ?

    its about 15 seconds to get Get-ScomClassInstance for some sql objects -very slow


    Wednesday, October 23, 2019 8:10 AM
  • Thursday, February 27, 2020 1:25 PM
  • no, there was another blog post (not technet or m$)

    anyway thanks, will try it


    Monday, March 2, 2020 5:07 PM
  • Hi,

    did you have the time to look into this? We would really appreciate your feedback here.

    Thanks in advance!


    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: Twitter: @StoyanChalakov

    Wednesday, April 1, 2020 9:11 AM