Skip to content

SCOM PowerShell V2 – Slow TAB Expansion Response

December 21, 2012

From time to time i find environments where the Operations Manager PowerShell is reacting very slow on the tab expansion. After some time i found the solution on Technet:

http://social.technet.microsoft.com/Forums/en-US/operationsmanagerextensibility/thread/c2652437-f1fe-4c4d-bd21-21cd6478a948

Simply run this command in the Operations Manager PowerShell or add it to your profile:

$tabExpand = (get-item function:\tabexpansion).Definition
if($tabExpand -match 'try {Resolve-Path.{49}(?=;)')
{
   $tabExpand = $tabExpand.Replace($matches[0], "if((get-location).Provider.Name -ne 'OperationsManagerMonitoring'){ $($matches[0]) }" )
   invoke-expression "function TabExpansion{$tabExpand}"
}

Happy Days!

Advertisements

From → System Center

One Comment
  1. Yerunski permalink

    Thanks, this solved the problem in our SCOM 2007 R2 environment too 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: