Author | Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Test-DbaCmConnection on GitHub.
Want to see the Bill Of Health for this command? Check out Test-DbaCmConnection.
Tests over which paths a computer can be managed.
Tests over which paths a computer can be managed.
This function tries out the connectivity for:
This function ignores global configuration settings limiting which protocols may be used.
Test-DbaCmConnection
[[-ComputerName] <DbaCmConnectionParameter[]>]
[[-Credential] <PSCredential>]
[[-Type] {None | CimRM | CimDCOM | Wmi | PowerShellRemoting}]
[-Force]
[-EnableException]
[<CommonParameters>]
PS C:\> Test-DbaCmConnection -ComputerName sql2014
Performs a full-spectrum connection test against the computer sql2014. The results will be reported and registered. Future calls from Get-DbaCmObject will recognize the results and optimize the query.
PS C:\> Test-DbaCmConnection -ComputerName sql2014 -Credential $null -Type CimDCOM, CimRM
This test will run a connectivity test of CIM over DCOM and CIM over WinRM against the computer sql2014 using Windows Authentication.
The results will be reported and registered. Future calls from Get-DbaCmObject will recognize the results and optimize the query.
The computer to test against.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value | $env:COMPUTERNAME |
The credentials to use when running the test. Bad credentials are automatically cached as non-working. This behavior can be disabled by the 'Cache.Management.Disable.BadCredentialList' configuration.
Alias | |
Required | False |
Pipeline | false |
Default Value |
The connection protocol types to test.
By default, all types are tested.
Note that this function will ignore global configurations limiting the types of connections available and test all connections specified here instead.
Available connection protocol types: "CimRM", "CimDCOM", "Wmi", "PowerShellRemoting"
Alias | |
Required | False |
Pipeline | false |
Default Value | @("CimRM", "CimDCOM", "Wmi", "PowerShellRemoting") |
If this switch is enabled, the Alert will be dropped and recreated on Destination.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |