Update-RedgateMonitorMonitoredObjectSelectedDatabase
Published 18 April 2024
Updates the selected database for Azure SQL Server
Syntax
Update-RedgateMonitorMonitoredObjectSelectedDatabase [-AzureSqlServer] <AzureSqlServer> [[-AutoDiscoveryEnabled] <bool>] [[-Databases] <string[]>] [<CommonParameters>]
Description
The Update-RedgateMonitorMonitoredObjectSelectedDatabase cmdlet updates the monitored databases for Azure SQL Server and Automatic database discovery setting on a Redgate Monitor Server.
Parameters
-AzureSqlServer
<AzureSqlServer>
The object to be updated.
Aliases | None |
Required? | true |
Position? | 1 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-AutoDiscoveryEnabled
<Boolean>
Flag to set automatic database discovery.
Aliases | None |
Required? | false |
Position? | 2 |
Default Value | False |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Databases
<String[]>
List of database names that need to be monitored, required if AutoDiscoveryEnabled is false.
Aliases | None |
Required? | false |
Position? | 3 |
Default Value | @() |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-ProgressAction
<ActionPreference>
{{ Fill ProgressAction Description }}
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
-
None.
You cannot pipe input to this cmdlet.
Examples
-------------------------- EXAMPLE 1 --------------------------
Update-RedgateMonitorMonitoredObjectSelectedDatabase -AzureSqlServer $AzureSqlServer -Databases "db1", "db2"
-------------------------- EXAMPLE 2 --------------------------
$Databases = Get-RedgateMonitorDetectedDatabase $azureCredentials | Where-Object { ("db1", "db2") -eq $_.Name } Update-RedgateMonitorMonitoredObjectSelectedDatabase -AzureSqlServer $AzureSqlServer -Databases $Databases.Name -AutoDiscoveryEnabled $false