| 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
)
Public Shared Function CreateRunspaceConnectionInfo (
Optional computerName As String = Nothing,
Optional connectionURI As String = Nothing,
Optional shellURI As String = "http://schemas.microsoft.com/powershell/Microsoft.PowerShell",
Optional credential As PSCredential = Nothing,
Optional authMechanism As AuthenticationMechanism = AuthenticationMechanism.Default,
Optional appName As String = "/wsman",
Optional operationTimeoutInSec As Integer = 300,
Optional openTimeoutInSec As Integer = 60,
Optional useSSL As Boolean = false,
Optional port As Integer = 0
) As RunspaceConnectionInfo
public:
static RunspaceConnectionInfo^ CreateRunspaceConnectionInfo(
String^ computerName = nullptr,
String^ connectionURI = nullptr,
String^ shellURI = L"http://schemas.microsoft.com/powershell/Microsoft.PowerShell",
PSCredential^ credential = nullptr,
AuthenticationMechanism authMechanism = AuthenticationMechanism::Default,
String^ appName = L"/wsman",
int operationTimeoutInSec = 300,
int openTimeoutInSec = 60,
bool useSSL = false,
int port = 0
)
static member CreateRunspaceConnectionInfo :
?computerName : string *
?connectionURI : string *
?shellURI : string *
?credential : PSCredential *
?authMechanism : AuthenticationMechanism *
?appName : string *
?operationTimeoutInSec : int *
?openTimeoutInSec : int *
?useSSL : bool *
?port : int
(* Defaults:
let _computerName = defaultArg computerName null
let _connectionURI = defaultArg connectionURI null
let _shellURI = defaultArg shellURI "http://schemas.microsoft.com/powershell/Microsoft.PowerShell"
let _credential = defaultArg credential null
let _authMechanism = defaultArg authMechanism AuthenticationMechanism.Default
let _appName = defaultArg appName "/wsman"
let _operationTimeoutInSec = defaultArg operationTimeoutInSec 300
let _openTimeoutInSec = defaultArg openTimeoutInSec 60
let _useSSL = defaultArg useSSL false
let _port = defaultArg port 0
*)
-> RunspaceConnectionInfo
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:
RunspaceConnectionInfoSee Also