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

What do I use for $instance in the Add-SqlMonitorAnnotation ?

Hi

I'm trying to make this query work, but it won't let me type in server name or instance name in the $instance variable.
What should I put in the $instance variable to make it work?

The manual says it should be a MonitoredObject value here, but what is that?
https://documentation.red-gate.com/sm/api/powershell-api/annotations


Add-SqlMonitorAnnotation -Target $instance -Description "Deployment" -UtcDate Get-Date<br>

Best Answer

  • Options
    scubakubascubakuba Posts: 3 New member
    Found a solution on how to add the proper value in $instance:

    $instance = Get-SqlMonitorInstance  -Name "insertthenamehere"
    Add-SqlMonitorAnnotation -Target $instance -Description "Deployment" -UtcDate Get-Date


Sign In or Register to comment.