Get-FilesConnection

Gets the current runspace's default connection, or every open connection it made.

Syntax

Default (Default)

Get-FilesConnection

All

Get-FilesConnection -All

Description

Get-FilesConnection writes the connection FilesCom commands use by default in the current runspace, if there is one. With -All it writes every open connection the runspace made. Connection objects show safe metadata only, never credentials.

Examples

Example 1: Show the default connection

Get-FilesConnection

Writes the default connection, or nothing when there is none.

Example 2: List every open connection

Get-FilesConnection -All | Format-Table BaseUrl, AuthenticationMethod, Username

Writes each open connection the runspace made.

Parameters

-All

Writes every open connection the current runspace made, not only its default.

  • Type: System.Management.Automation.SwitchParameter
  • Parameter sets: All (required)

Common Parameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

  • None: The command takes no pipeline input.

Outputs

  • FilesCom.PowerShell.FilesConnection: The default connection, or with -All every open connection.

Notes

Each runspace has its own default connection. A default chosen in one runspace never affects another. See about_FilesCom for connections, errors and previewing changes.

  • Get-Help about_FilesCom