These pages cover SQL Monitor 10, which is not the latest version. Help for other versions is also available.
Add-SqlMonitorMonitoredObject
Published 17 August 2020
Adds the given monitored object to SQL Monitor.
Syntax
- Add-SqlMonitorMonitoredObject [-MonitoredObject] <string> [-BaseMonitor] <BaseMonitor> [[-Group] <Object>] [[-WindowsUserName] <string>] [[-WindowsPassword] <string>] [[-SqlServerAuthenticationMode] <string>] [[-SqlServerUserName] <string>] [[-SqlServerPassword] <string>] [[-NetworkProtocol] <string>] [[-SqlServerPort] <int>] [[-PacketSize] <int>] [[-ConnectionTimeout] <int>] [[-ExecutionTimeout] <int>] [[-EncryptConnection] <bool>] [[-AutoDetectClusterName] <bool>] [[-WmiType] <string>] [[-TrustServerCertificate] <bool>] [[-Type] <string>] [<CommonParameters>]
Description
The Add-MonitoredObject cmdlet adds Azure SQL Databases, Azure Sql Servers, Clusters and Monitored Machines to a SQL Monitor server.
Parameters
-MonitoredObject
<String>
The address of the monitored object e.g. "localhost".
Aliases | None |
Required? | true |
Position? | 1 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-BaseMonitor
<BaseMonitor>
The base monitor to add the monitored object to. For more informatiom, see https://documentation.red-gate.com/sm/api/powershell-cmdlet-reference/get-sqlmonitorbasemonitor.
Aliases | None |
Required? | true |
Position? | 2 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Group
<Object>
Group object - please use Get-Group or related methods to find the group.
Aliases | None |
Required? | false |
Position? | 3 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-WindowsUserName
<String>
The Windows UserName to connect to the windows host, if not supplied, using Base Monitor Service account.
Aliases | None |
Required? | false |
Position? | 4 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-WindowsPassword
<String>
The Windows Password to connect to the windows host, if not supplied, using Base Monitor Service account.
Aliases | None |
Required? | false |
Position? | 5 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-SqlServerAuthenticationMode
<String>
"windows" or "sqlServer" or "inherit", the last option uses the credentials supplied for Windows username/password or Base Monitor Service credentials.
Aliases | None |
Required? | false |
Position? | 6 |
Default Value | Inherit |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-SqlServerUserName
<String>
SQL login username to connect to SQL Server instance with.
Aliases | None |
Required? | false |
Position? | 7 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-SqlServerPassword
<String>
SQL login password to connect to SQL Server instance with.
Aliases | None |
Required? | false |
Position? | 8 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-NetworkProtocol
<String>
SQL Network Protocol.
Aliases | None |
Required? | false |
Position? | 9 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-SqlServerPort
<Int32>
SQL Server default port number.
Aliases | None |
Required? | false |
Position? | 10 |
Default Value | 0 |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-PacketSize
<Int32>
Packet size.
Aliases | None |
Required? | false |
Position? | 11 |
Default Value | 0 |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-ConnectionTimeout
<Int32>
Connection time-out.
Aliases | None |
Required? | false |
Position? | 12 |
Default Value | 0 |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-ExecutionTimeout
<Int32>
Execution time-out.
Aliases | None |
Required? | false |
Position? | 13 |
Default Value | 0 |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-EncryptConnection
<Boolean>
Encrypt connection.
Aliases | None |
Required? | false |
Position? | 14 |
Default Value | False |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-AutoDetectClusterName
<Boolean>
Auto detect cluster name.
Aliases | None |
Required? | false |
Position? | 15 |
Default Value | False |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-WmiType
<String>
WMI type.
Aliases | None |
Required? | false |
Position? | 16 |
Default Value | None |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-TrustServerCertificate
<Boolean>
Trust server certificate
Aliases | None |
Required? | false |
Position? | 17 |
Default Value | False |
Accept Pipeline Input | False |
Accept Wildcard Characters | false |
-Type
<String>
"Cluster" or "AzureSqlServer" or "AmazonRdsSqlServer"
Aliases | None |
Required? | false |
Position? | 18 |
Default Value | Cluster |
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.
Return values
The output type is the type of the objects that the cmdlet emits.
-
None.
You cannot pipe input to this cmdlet.
Examples
-------------------------- EXAMPLE 1 --------------------------
- Add-SqlMonitorMonitoredObject -MonitoredObject "localhost" -BaseMonitor $BaseMonitor