Quantcast
Channel: Operations Manager - General forum
Viewing all articles
Browse latest Browse all 11941

Get-SCOMManagementPack not accepting RegEx as input for -DisplayName & -Name switches, contrary to description

$
0
0

Hello,

I believe that I’ve stumbled on a bug with the Get-SCOMManagementPack PoSH CmdLet during my attempt to convert the following, self-evident, SCOM 2007 R2 PoSH pipeline:

Get-ManagementPack | Where-Object {$_.DisplayName -match "SQL Server"}

...into a more efficient SCOM 2012 SP1 equivalent, here:

Get-SCOMManagementPack -DisplayName "SQL Server"

As seen in the CmdLet’s Get-Help output, the new Get-SCOMManagementPack CmdLet sports new, more efficient,-DisplayName& -Name switches which, according to the following descriptions, are supposed to support regular expressions:

-DisplayName <String[]>

   Specifies the display name of the management packs to retrieve. This parameter is interpreted as a regular expression.

-Name <String[]>

   Specifies the names of the management packs to retrieve. This parameter is interpreted as a regular expression.

Unfortunately, the above command yields anempty set.  The following, less efficient command, works as expected:

Get-SCOMManagementPack | Where-Object {$_.DisplayName -match "SQL Server"}

Are others seeing this?

Thanks,

Larry


Viewing all articles
Browse latest Browse all 11941

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>