New-RedgateMonitorWindowsHost
Published 18 April 2024
Creates a new temporary object that holds information about a Windows host.
Syntax
New-RedgateMonitorWindowsHost [-FullName] <string> [-BaseMonitor] <BaseMonitor> [[-Group] <Group>] [[-UserName] <string>] [[-Password] <string>] [[-AutoDetectClusterName] <bool>] [[-WmiType] <string>] [[-EncodePortInServicePrincipalNameForWinRM] <bool>] [[-TrustWinRMServerCertificate] <bool>] [<CommonParameters>]
Description
The New-RedgateMonitorWindowsHost cmdlet creates a new temporary object that holds information about a Windows host. The returned object needs to be passed to Add-RedgateMonitorMonitoredObject, as it does not add anything to Redgate Monitor on its own.
Parameters
-FullName
<String>
The address of the monitored object e.g. "localhost".
| Aliases | None |
| Required? | true |
| Position? | 1 |
| Default Value | None |
| Accept Pipeline Input | True (ByValue) |
| Accept Wildcard Characters | false |
-BaseMonitor
<BaseMonitor>
The base monitor to add the monitored object to. For more information, see https://documentation.red-gate.com/monitor14/api/powershell-api/powershell-cmdlet-reference/get-redgatemonitorbasemonitor.
| Aliases | None |
| Required? | true |
| Position? | 2 |
| Default Value | None |
| Accept Pipeline Input | False |
| Accept Wildcard Characters | false |
-Group
<Group>
Group object - 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 |
-UserName
<String>
The 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 |
-Password
<String>
The 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 |
-AutoDetectClusterName
<Boolean>
Auto detect cluster name. This is enabled by default, set to false to disable auto-detection.
| Aliases | None |
| Required? | false |
| Position? | 6 |
| Default Value | True |
| Accept Pipeline Input | False |
| Accept Wildcard Characters | false |
-WmiType
<String>
WMI type. Value values are 'winrmhttps', 'winrmhttp' and 'dcom'.
| Aliases | None |
| Required? | false |
| Position? | 7 |
| Default Value | None |
| Accept Pipeline Input | False |
| Accept Wildcard Characters | false |
-EncodePortInServicePrincipalNameForWinRM
<Boolean>
Encode port in service principal name. This parameter can only be used when the 'WmiType' is set to 'winrmhttp' or 'winrmhttps'.
| Aliases | None |
| Required? | false |
| Position? | 8 |
| Default Value | False |
| Accept Pipeline Input | False |
| Accept Wildcard Characters | false |
-TrustWinRMServerCertificate
<Boolean>
Skip validation of the server certificate, for example when the host uses a self-signed certificate. This parameter can only be used when the 'WmiType' is set to 'winrmhttps'. Without validation, an attacker on the network path can intercept the Windows credentials. If you omit it, Redgate Monitor validates the certificate, unless the host's agent is older than 14.43.0 and can't.
| Aliases | None |
| Required? | false |
| Position? | 9 |
| Default Value | None |
| Accept Pipeline Input | False |
| Accept Wildcard Characters | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable, and -ProgressAction. 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 --------------------------
$server = New-RedgateMonitorWindowsHost -HostName "localhost" -BaseMonitor $BaseMonitor $server | Add-RedgateMonitorMonitoredObject
-------------------------- EXAMPLE 2 --------------------------
$server = New-RedgateMonitorWindowsHost -HostName "localhost" -BaseMonitor $BaseMonitor -WindowsUserName "win_username" -WindowsPassword "win_pass" $server | Add-RedgateMonitorMonitoredObject
-------------------------- EXAMPLE 3 --------------------------
$server = New-RedgateMonitorWindowsHost -HostName "localhost" -BaseMonitor $BaseMonitor $instance = New-RedgateMonitorPostgreSql -FullName "localhost" -BaseMonitor $BaseMonitor -UserName "pg_username" -Password "pg_pass" -Port 5432 $server, $instance | Add-RedgateMonitorMonitoredObject
This adds a PostgreSQL instance on a Windows host. AutoDetectClusterName is ignored for a PostgreSQL host.
This documentation contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved