This topic has not yet been rated - Rate this topic

WSManConnectionInfo Constructor

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Creates a new WSManConnectionInfo object that contains the schema, computer name, the maximum allowed time (in milliseconds) for the remote runspace to open, and more. This constructor is introduced by Windows PowerShell 2.0.


Namespace: System.Management.Automation.Runspaces
Assembly: System.Management.Automation (in System.Management.Automation)
'Usage
Dim scheme As String
Dim computerName As String
Dim port As Integer
Dim appName As String
Dim shellUri As String
Dim credential As PSCredential
Dim openTimeout As Integer

Dim instance As New WSManConnectionInfo(scheme, computerName, port, appName, shellUri, credential, openTimeout)
public WSManConnectionInfo (
	string scheme,
	string computerName,
	int port,
	string appName,
	string shellUri,
	PSCredential credential,
	int openTimeout
)
public WSManConnectionInfo (
	String scheme, 
	String computerName, 
	int port, 
	String appName, 
	String shellUri, 
	PSCredential credential, 
	int openTimeout
)
public function WSManConnectionInfo (
	scheme : String, 
	computerName : String, 
	port : int, 
	appName : String, 
	shellUri : String, 
	credential : PSCredential, 
	openTimeout : int
)

Parameters

scheme

The scheme to be used for the connection.

computerName

The name of the computer where the remote runspace is opened. The value can be a fully qualified domain name, a NetBIOS name, or an IP address. For the local computer name (default), use localhost, or use a dot (.) to specify the local computer. When the remote computer is in a different domain from the user, a fully qualified domain name must be used.

port

The port on the computer where the remote connection is made.

appName

The application end point to connect to.

shellUri

Uniform Resource Identifier (URI) of the shell that is launched when the connection is made.

credential

A PSCredential object that contain the credentials used to make the connection.

openTimeout

The maximum allowed time (in milliseconds) for the remote runspace to open.

Exception type Condition
ArgumentException

A schema or port that is not valid has been specified.

 

Target Platforms

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)