This project is read-only.

Synopsis

Shows sql connection.

Syntax

Show-SqlConnection [[-ConnectionName] <String>] [<CommonParameters>]

Show-SqlConnection -All <SwitchParameter> [<CommonParameters>]

Description

Shows details about the sql connection.
’All’ switch will return list of names for active connections.

Parameters

-ConnectionName <String>

User defined name for connection.

Required? False
Position? 0
Default value Default
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-All <SwitchParameter>

Returns a list of names for all active connections.

Required? True
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Examples

Example 1

PS C:\> Show-SqlConnection
ConnectionName    : Default
ConnectionType    : SQLite
ConnectionState   : Open
ConnectionString  : data source=:memory:
ConnectionTimeout : 15
ServerVersion     : 3.8.10.2
CommandTimeout    : 30
HasTransaction    : False

Displays connection information.

Example 2

PS C:\> Show-SqlConnection -All
Default
Test

Lists all SqlConnections

Last edited Jun 23, 2015 at 2:30 PM by mastertook, version 2