WSManConnectionInfo WSManConnectionInfo WSManConnectionInfo Class

Definition

Class which defines path to a remote runspace that need to be created

public sealed class WSManConnectionInfo : System.Management.Automation.Runspaces.RunspaceConnectionInfo
type WSManConnectionInfo = class
    inherit RunspaceConnectionInfo
Public NotInheritable Class WSManConnectionInfo
Inherits RunspaceConnectionInfo
Inheritance
WSManConnectionInfoWSManConnectionInfoWSManConnectionInfo

Constructors

WSManConnectionInfo() 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

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

Constructor used to create a WSManConnectionInfo

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

Constructor that constructs the configuration name from its type

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

Constructor used to create a WSManConnectionInfo

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

Constructor used to create a WSManConnectionInfo

WSManConnectionInfo(Uri) WSManConnectionInfo(Uri) 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) WSManConnectionInfo(Uri, String, PSCredential) 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) WSManConnectionInfo(Uri, String, String) 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.

Fields

HttpScheme HttpScheme HttpScheme

string for http scheme

HttpsScheme HttpsScheme HttpsScheme

string for https scheme

MaxPort MaxPort MaxPort Inherited from RunspaceConnectionInfo
MinPort MinPort MinPort Inherited from RunspaceConnectionInfo

Properties

AppName AppName AppName

AppName which identifies the connection end point in the machine

AuthenticationMechanism AuthenticationMechanism AuthenticationMechanism

Authentication mechanism to use while connecting to the server

CancelTimeout CancelTimeout CancelTimeout Inherited from RunspaceConnectionInfo
CertificateThumbprint CertificateThumbprint CertificateThumbprint

ThumbPrint of a certificate used for connecting to a remote machine. When this is specified, you dont need to supply credential and authentication mechanism.

ComputerName ComputerName ComputerName

Name of the computer

ConnectionUri ConnectionUri ConnectionUri

Uri associated with this connection path

Credential Credential Credential

Credential used for the connection

Culture Culture Culture Inherited from RunspaceConnectionInfo
EnableNetworkAccess EnableNetworkAccess EnableNetworkAccess

When true and in loopback scenario (localhost) this enables creation of WSMan host process with the user interactive token, allowing PowerShell script network access, i.e., allows going off box. When this property is true and a PSSession is disconnected, reconnection is allowed only if reconnecting from a PowerShell session on the same box.

IdleTimeout IdleTimeout IdleTimeout Inherited from RunspaceConnectionInfo
IncludePortInSPN IncludePortInSPN IncludePortInSPN

Uses Service Principal Name (SPN) along with the Port number during authentication.

MaxConnectionRetryCount MaxConnectionRetryCount MaxConnectionRetryCount

Specifies the maximum number of connection retries if previous connection attempts fail due to network issues.

MaxIdleTimeout MaxIdleTimeout MaxIdleTimeout Inherited from RunspaceConnectionInfo
MaximumConnectionRedirectionCount MaximumConnectionRedirectionCount MaximumConnectionRedirectionCount

Maximum uri redirection count

MaximumReceivedDataSizePerCommand MaximumReceivedDataSizePerCommand MaximumReceivedDataSizePerCommand

Total data (in bytes) that can be received from a remote machine targeted towards a command. If null, then the size is unlimited. Default is unlimited data.

MaximumReceivedObjectSize MaximumReceivedObjectSize MaximumReceivedObjectSize

Maximum size (in bytes) of a deserialized object received from a remote machine. If null, then the size is unlimited. Default is unlimited object size.

NoEncryption NoEncryption NoEncryption

Specifies that no encryption will be used when doing remote operations over http. Unencrypted traffic is not allowed by default and must be enabled in the local configuration

NoMachineProfile NoMachineProfile NoMachineProfile

If true then Operating System won't load the user profile (i.e. registry keys under HKCU) on the remote server which can result in a faster session creation time. This option won't have any effect if the remote machine has already loaded the profile (i.e. in another session).

OpenTimeout OpenTimeout OpenTimeout Inherited from RunspaceConnectionInfo
OperationTimeout OperationTimeout OperationTimeout Inherited from RunspaceConnectionInfo
OutputBufferingMode OutputBufferingMode OutputBufferingMode

Determines how server in disconnected state deals with cached output data when the cache becomes filled.

Port Port Port

Port in which to connect

ProxyAccessType ProxyAccessType ProxyAccessType

By default, wsman uses IEConfig - the current user Internet Explorer proxy settings for the current active network connection. This option requires the user profile to be loaded, so the option can be directly used when called within a process that is running under an interactive user account identity; if the client application is running under a user context different then the interactive user, the client application has to explicitly load the user profile prior to using this option.

IMPORTANT: proxy configuration is supported for HTTPS only; for HTTP, the direct connection to the server is used

ProxyAuthentication ProxyAuthentication ProxyAuthentication

The following is the definition of the input parameter "ProxyAuthentication". This parameter takes a set of authentication methods the user can select from. The available options should be as follows:

  • Negotiate: Use the default authentication (ad defined by the underlying protocol) for establishing a remote connection.
  • Basic: Use basic authentication for establishing a remote connection
  • Digest: Use Digest authentication for establishing a remote connection
ProxyCredential ProxyCredential ProxyCredential

The following is the definition of the input parameter "ProxyCredential".

Scheme Scheme Scheme

Scheme used for connection

ShellUri ShellUri ShellUri
SkipCACheck SkipCACheck SkipCACheck

When connecting over HTTPS, the client does not validate that the server certificate is signed by a trusted certificate authority (CA). Use only when the remote computer is trusted by other means, for example, if the remote computer is part of a network that is physically secure and isolated or the remote computer is listed as a trusted host in WinRM configuration

SkipCNCheck SkipCNCheck SkipCNCheck

Indicates that certificate common name (CN) of the server need not match the hostname of the server. Used only in remote operations using https. This option should only be used for trusted machines.

SkipRevocationCheck SkipRevocationCheck SkipRevocationCheck

Indicates that certificate common name (CN) of the server need not match the hostname of the server. Used only in remote operations using https. This option should only be used for trusted machines

UICulture UICulture UICulture Inherited from RunspaceConnectionInfo
UseCompression UseCompression UseCompression

If true, underlying WSMan infrastructure will compress data sent on the network. If false, data will not be compressed. Compression improves performance by reducing the amount of data sent on the network. Compression my require extra memory consumption and CPU usage. In cases where available memory / CPU is less, set this property to false. By default the value of this property is "true".

UseUTF16 UseUTF16 UseUTF16

Indicates the request is encoded in UTF16 format rather than UTF8 format; UTF8 is the default.

Methods

Copy() Copy() Copy()

Does a shallow copy of the current instance

SetSessionOptions(PSSessionOption) SetSessionOptions(PSSessionOption) SetSessionOptions(PSSessionOption)

Populates session options from a PSSessionOption instance.

Applies to