How do you use cloud databases? Take the survey.
Options

PowerShell error with Get-SqlMonitorCluster

Code that worked before appears broken in 10.2.8.631
Using code:
   using module 'redacted\RedgateSQM'
    Connect-SqlMonitor -ServerURL 'http://redacted' -AuthToken 'redacted' 
    Get-SqlMonitorCluster 

Results in error:
Cannot convert value "@{BaseMonitor=; Type=Cluster; DisplayType=Cluster;
    | FullName=redacted; Group=; Id=redacted;
    | Name=redacted}" to type "Cluster". Error: "Cannot convert the "@{BaseMonitor=;
    | Type=Cluster; DisplayType=Cluster; FullName=redacted; Group=;
    | Id=redacted; Name=redacted}" value of type
    | "System.Management.Automation.PSCustomObject" to type "Cluster"."

I know I am connected as other commands like  Get-SqlMonitorBaseMonitor work just fine.

Thanks for any help or insight you can provide.
Andrew
Tagged:

Answers

  • Options
    Hi Andrew,

    I think you may need to re download the latest PowerShell Module, extract the new files and then restart your PowerShell session.  I've just done the same thing where I updated to 10.2.8, had an old RedgateSQM module and go the same error and updating fixes it. (need to restart PoSh)
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.