WSManConnectionInfo Constructors

Definition

Overloads

WSManConnectionInfo()

Creates a WSManConnectionInfo for the following URI and with the default credentials, default server life time and default open timeout http://localhost/ The default shellname Microsoft.PowerShell will be used

WSManConnectionInfo(PSSessionType)

Constructor that constructs the configuration name from its type

WSManConnectionInfo(Uri)

constructor to create a WSManConnectionInfo with a uri specified and the default credentials, default server life time and default open timeout

WSManConnectionInfo(Uri, String, PSCredential)

Constructor to create a WSManConnectionInfo with a uri and explicit credentials - server life time is default and open timeout is default

WSManConnectionInfo(Uri, String, String)

Constructor used to create a WSManConnectionInfo. This constructor supports a certificate thumbprint to be used while connecting to a remote machine instead of credential.

WSManConnectionInfo(Boolean, String, Int32, String, String, PSCredential)

Constructor used to create a WSManConnectionInfo

WSManConnectionInfo(String, String, Int32, String, String, PSCredential)

Constructor used to create a WSManConnectionInfo

WSManConnectionInfo(Boolean, String, Int32, String, String, PSCredential, Int32)
WSManConnectionInfo(String, String, Int32, String, String, PSCredential, Int32)

Constructor used to create a WSManConnectionInfo

WSManConnectionInfo()

Creates a WSManConnectionInfo for the following URI and with the default credentials, default server life time and default open timeout http://localhost/ The default shellname Microsoft.PowerShell will be used

public WSManConnectionInfo ();

WSManConnectionInfo(PSSessionType)

Constructor that constructs the configuration name from its type

public WSManConnectionInfo (System.Management.Automation.Runspaces.PSSessionType configurationType);
Parameters
configurationType
PSSessionType

type of configuration to construct

WSManConnectionInfo(Uri)

constructor to create a WSManConnectionInfo with a uri specified and the default credentials, default server life time and default open timeout

public WSManConnectionInfo (Uri uri);
Parameters
uri
Uri

uri of remote runspae

Exceptions

When an uri representing an invalid path is specified

WSManConnectionInfo(Uri, String, PSCredential)

Constructor to create a WSManConnectionInfo with a uri and explicit credentials - server life time is default and open timeout is default

public WSManConnectionInfo (Uri uri, string shellUri, System.Management.Automation.PSCredential credential);
Parameters
uri
Uri

uri of remote runspace

shellUri
String
credential
PSCredential

credentials to use to connect to the remote runspace

Exceptions

When an uri representing an invalid path is specified

WSManConnectionInfo(Uri, String, String)

Constructor used to create a WSManConnectionInfo. This constructor supports a certificate thumbprint to be used while connecting to a remote machine instead of credential.

public WSManConnectionInfo (Uri uri, string shellUri, string certificateThumbprint);
Parameters
uri
Uri

uri of remote runspace

shellUri
String
certificateThumbprint
String

A thumb print of the certificate to use while connecting to the remote machine.

WSManConnectionInfo(Boolean, String, Int32, String, String, PSCredential)

Constructor used to create a WSManConnectionInfo

public WSManConnectionInfo (bool useSsl, string computerName, int port, string appName, string shellUri, System.Management.Automation.PSCredential credential);
Parameters
useSsl
Boolean
computerName
String
port
Int32
appName
String
shellUri
String
credential
PSCredential

WSManConnectionInfo(String, String, Int32, String, String, PSCredential)

Constructor used to create a WSManConnectionInfo

public WSManConnectionInfo (string scheme, string computerName, int port, string appName, string shellUri, System.Management.Automation.PSCredential credential);
Parameters
scheme
String

Scheme to be used for connection.

computerName
String

computer to connect to

port
Int32

port to connect to

appName
String

application end point to connect to

shellUri
String

remote shell to launch on connection

credential
PSCredential

credential to be used for connection

Exceptions

Invalid scheme or invalid port is specified

Remarks

max server life timeout and open timeout are default in this case

WSManConnectionInfo(Boolean, String, Int32, String, String, PSCredential, Int32)

public WSManConnectionInfo (bool useSsl, string computerName, int port, string appName, string shellUri, System.Management.Automation.PSCredential credential, int openTimeout);
Parameters
useSsl
Boolean
computerName
String
port
Int32
appName
String
shellUri
String
credential
PSCredential
openTimeout
Int32

WSManConnectionInfo(String, String, Int32, String, String, PSCredential, Int32)

Constructor used to create a WSManConnectionInfo

public WSManConnectionInfo (string scheme, string computerName, int port, string appName, string shellUri, System.Management.Automation.PSCredential credential, int openTimeout);
Parameters
scheme
String

scheme to be used for connection

computerName
String

computer to connect to

port
Int32

port to connect to

appName
String

application end point to connect to

shellUri
String

remote shell to launch on connection

credential
PSCredential

credential to be used for connection

openTimeout
Int32

Timeout in milliseconds for open call on Runspace to finish

Exceptions

Invalid scheme or invalid port is specified