Add alias with powershell module
We install our sql server automatically via powershell, so we also add them there to the monitoring. We would like to safe us work, by giving the server a custom alias while adding to the monitoring as it can be done through the website.
-
Greg Smulko (Redgate) commented
This is now possible. :)
You can use Update-SqlMonitorMonitoredObject to set the alias of an existing object, as well as the pair of New-* (e.g. New-SqlMonitorSqlServer) / Add-SqlMonitorMonitoredObject.
Please refer to examples (either in your installation or in https://monitor.red-gate.com/Configuration/ExampleScripts) and docs (https://documentation.red-gate.com/sm/api/powershell-api/powershell-cmdlet-reference) for more info.