Click or drag to resize
Galactic API

PowerShellCreateRunspaceConnectionInfo Method

Creates an object with the information necessary to create a connection for a Runspace or RunspacePool. Note: computerName and connectionURI are mutually exclusive. If both are provided, the computerName parameter will be used. computerName and connectionURI need only be supplied for remote connections. If neither are provided a configuration for a local connection using all defaults will be created.

Namespace:  Galactic.PowerShell
Assembly:  Galactic.PowerShell (in Galactic.PowerShell.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax
public static RunspaceConnectionInfo CreateRunspaceConnectionInfo(
	string computerName = null,
	string connectionURI = null,
	string shellURI = "http://schemas.microsoft.com/powershell/Microsoft.PowerShell",
	PSCredential credential = null,
	AuthenticationMechanism authMechanism = AuthenticationMechanism.Default,
	string appName = "/wsman",
	int operationTimeoutInSec = 300,
	int openTimeoutInSec = 60,
	bool useSSL = false,
	int port = 0
)

Parameters

computerName (Optional)
Type: SystemString
[Optional] The hostname or FQDN of the computer to connect to. Defaults to null for a local connection.
connectionURI (Optional)
Type: SystemString
[Optional] The URI to the PowerShell service to connect with. Defaults to DEFAULT_SHELL_URI.
shellURI (Optional)
Type: SystemString
[Optional] The URI of the shell that is launched once the connection is made.
credential (Optional)
Type: PSCredential
[Optional] The PowerShell credentials to use when making the connection. Defaults to null which does not provide implicit credentials for the connection.
authMechanism (Optional)
Type: AuthenticationMechanism
[Optional] The authentication mechanism employed when creating the connection. Defaults to null which uses the PowerShell default mechanism.
appName (Optional)
Type: SystemString
[Optional] The application name used when making the PowerShell connection. Defaults to DEFAULT_APP_NAME which is the default PowerShell application name used for connections.
operationTimeoutInSec (Optional)
Type: SystemInt32
[Optional] The time in seconds that a PowerShell connection will wait for an operation to complete before timing out. Defaults to DEFAULT_OPERATION_TIMEOUT_IN_SEC.
openTimeoutInSec (Optional)
Type: SystemInt32
[Optional] The time in seconds that a PowerShell connection will wait for a connection to be established before timing out. Defaults to DEFAULT_OPEN_TIMEOUT_IN_SEC.
useSSL (Optional)
Type: SystemBoolean
[Optional] Whether to use SSL when creating the connection. Defaults to false.
port (Optional)
Type: SystemInt32
[Optional] The port number to use when making the connection. Defaults to the PowerShell default port number appropriate to the SSL state of the connection.

Return Value

Type: RunspaceConnectionInfo
See Also