8 Replies Latest reply on Apr 26, 2016 11:36 AM by jest4kicks

    Bulk-unmanage of SQL databases


      Hey all, we're in the process of adding AppInsight for SQL monitoring to our environment.  Because of the way this monitor deals with SQL 2014 AAG clusters, we need to link the monitor to each of the physical nodes, and to each of the clustered listeners.


      Each time we do this, the monitor discovers all of the databases present in that instance, but we only want it to report on the databases that are pertinent to the respective listener.


      To do this, we decided to just unmanage all of the databases on each linked monitor (other than the ones relevant to said monitor).


      TL;DR, I need a way to bulk-unmanage all databases associated with a given AppInsight for SQL monitor.


      I tried using something like this (taken from another thread and tweaked):



           Invoke-SwisVerb $swis Orion.APM.SqlDatabase Unmanage @("ABSD:73",$now,$later,$false)


      However I discovered that "Unmanage" is not a valid verb for the Orion.APM.SqlDatabase container.


      I assume I need to use Set-swisobject, but I'm not sure how to get the URI's for all of the associated databases and pipe them into that command.


      Can anyone help?