Home > Command Shell, SCOM > OpsMgr Command Shell Performance

OpsMgr Command Shell Performance

Have you noticed that the command shell performance is lacking? Tab-completion can take over 15 minutes to complete, depending on how many servers you’re monitoring. I’m not 100% sure of the exact reasons behind it, but it seems that the auto-complete will first traverse the local path you’re in when it attempts to complete a command. And when you’re trying to do this from the monitoring:: provider, that means it will possibly look through tens of thousands of objects.

I thought that behavior was a little odd, because most other providers will attempt to auto-complete known cmdlets first THEN go through the local directory. So I went to MS Connect and logged a bug report, bug ID #436239.

And this morning I received a response from Cory Delamarter, the Senior Program Manager for Operations Manager. He wrote:

Jeremy – Thank you very much for reporting this. We’ve confirmed this behavior and we will defintely look into how we can improve this in future releases.

The feedback is much appreciated!

So hopefully we’ll get that fixed soon and it’ll be just as fast as all the other providers out there! There really isn’t a work-around for this, as most (If not all) of the OpsMgr commands need to be run from the monitoring:: provider, or else they will fail. So we’ll have to live with it for just awhile longer.

Categories: Command Shell, SCOM Tags: , ,
  1. May 28th, 2009 at 05:38 | #1

    if what you are trying to auto-complete a cmdlet name, you need to reach the “-” dash sign.

    So if you type GET -THIS will take ages, because yes, it is searching for a file on the current drive FIRST – which in ops mgr is an object, since the drive is a provider… and it is a SQL query at the end of the chain.

    But if you type Get- <<– see? you actually include the “-” that separates VERB from NOUN in a cmdlet, THEN it is fast, as it will search in cmdlets FIRST.

    Try it out.

  2. May 28th, 2009 at 05:41 | #2

    your comment form is stripping out brachets, I should have imagined it…
    what I really wrote was something like: if you type GET and hit TAB immediately, it takes ages….
    if you type GET- and then hit TAB…
    hope this makes it clearer :-)

  3. jpavleck
    May 31st, 2009 at 22:09 | #3

    Yup, I was doing it that way, typing Get- and that was taking forever and a day to complete. Seems like it’s pretty dependent on the size of the network. I’d been talking to people about it for awhile to make sure it wasn’t just me before I bugged it.

  4. January 27th, 2010 at 01:42 | #4

    Just to close the loop on this Lincoln found a great way to work around this if you are using PowerShell v2 to run the command shell in. He posted those details to http://blogs.technet.com/momteam/archive/2009/12/09/slow-tab-expansion-in-ops-mgr-powershell-v2-console.aspx.

    In the next release we’re looking at doing away with the provider altogether so this problem should go away moving forward.

    Thanks again for bringing this to our attention!

  1. No trackbacks yet.