Get-SQLMonitorGroup doesn't do what one would expect.
Phil_Fact0r
Posts: 20 Bronze 3
I have three groups, Staging, Development and Production
Your documentation says this....
if I do this in PowerShell...
....I get this
Your documentation says this....
<div> -------------------------- EXAMPLE 1 --------------------------</div><div> </div><div> PS C:\>Get-SqlMonitorGroup -Path 'Production', 'Accounting'<br></div>
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>+ throw "Failed to find group ""$($Path[0])""";</div><div>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div> + CategoryInfo : OperationStopped: (Failed to find group "Staging":String) [], RuntimeException</div><div> + 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
Tagged:
Best Answer
-
Phil_Fact0r Posts: 20 Bronze 3I'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.