Author | Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbaCmConnection on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaCmConnection.
Retrieves windows management connections from the cache
Retrieves windows management connections from the cache
Get-DbaCmConnection
[[-ComputerName] <String[]>]
[[-UserName] <String>]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaCmConnection
List all cached connections.
PS C:\> Get-DbaCmConnection sql2014
List the cached connection - if any - to the server sql2014.
PS C:\> Get-DbaCmConnection -UserName "*charles*"
List all cached connection that use a username containing "charles" as default or override credentials.
The computername to ComputerName for.
Alias | Filter |
Required | False |
Pipeline | true (ByValue) |
Default Value | * |
Username on credentials to look for. Will not find connections using the default windows credentials.
Alias | |
Required | False |
Pipeline | false |
Default Value | * |
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 |