How can we help you today? How can we help you today?

Get-SQLMonitorGroup doesn't do what one would expect.

I have three groups, Staging, Development and Production

Your documentation says this....
 
<div>&nbsp; -------------------------- EXAMPLE 1 --------------------------</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; PS C:\>Get-SqlMonitorGroup -Path 'Production', 'Accounting'<br></div>

if I do this in PowerShell...
Get-SQLMonitorGroup -path 'Staging','production','Development'

....I get this
<div>Failed to find group "Staging"</div><div>At C:\Program Files\WindowsPowerShell\Modules\RedgateSQM\RedgateSQM.psm1:736 char:9</div><div>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw "Failed to find group ""$($Path[0])""";</div><div>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>&nbsp; &nbsp; + CategoryInfo&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : OperationStopped: (Failed to find group "Staging":String) [], RuntimeException</div><div>&nbsp; &nbsp; + FullyQualifiedErrorId : Failed to find group "Staging"</div>
when I feed the parameters in one at a time interactively the same thing happens. How do I get the groups as MonitoredObjects
Phil_Fact0r
0

Comments

1 comment

  • Phil_Fact0r
    I'll answer my own question about how to get a group. There is another Cmdlet called Get-SQLMonitorMainGroups that seems to do what I want. One then gets subgroups using Get-SqlMonitorSubGroups. I'm still mystified about what Get-SQLMonitorGroup does.
    Phil_Fact0r
    0

Add comment

Please sign in to leave a comment.