Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Options for a remote PSSession
public ref class PSSessionOption sealed
public sealed class PSSessionOption
type PSSessionOption = class
Public NotInheritable Class PSSessionOption
Creates a new instance of PSSessionOption
Application arguments the server can see in ApplicationArguments
The duration for which PowerShell should wait before it times out on cancel operations (close runspace or stop powershell). For instance, when the user hits ctrl-C, New-PSSession cmdlet tries to call a stop on all remote runspaces which are in the Opening state. The user wouldn’t mind waiting for 15 seconds, but this should be time bound and of a shorter duration. A high timeout here like 3 minutes will give the user a feeling that the PowerShell client has hung.
Default: 60 * 1000 = 1 minute
Culture that the remote session should use
The duration for which a Runspace on server needs to wait before it declares the client dead and closes itself down. This is especially important as these values may have to be configured differently for enterprise administration and exchange scenarios.
Default: -1 -> Use current server value for IdleTimeout.
Uses Service Principal Name (SPN) along with the Port number during authentication.
Number of times a connection will be re-attempted when a connection fails due to network issues.
The MaximumConnectionRedirectionCount parameter enables the implicit redirection functionality. -1 = no limit 0 = no redirection
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.
Maximum size (in bytes) of a deserialized object received from a remote machine. If null, then the size is unlimited. Default is 200MB object size.
If false, underlying WSMan infrastructure will compress data sent on the network. If true, 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 "true". By default the value of this property is "false".
Specifies that no encryption will be used when doing remote operations over http. Unencrypted traffix is not allowed by default and must be enabled in the local configuration
The duration for which PowerShell remoting waits before timing out on a connection to a remote machine. Simply put, the timeout for a remote runspace creation. The user would like to tweak this timeout depending on whether he/she is connecting to a machine in the data center or across a slow WAN.
Default: 3 * 60 * 1000 = 3 minutes
The duration for which PowerShell remoting waits before timing out for any operation. The user would like to tweak this timeout depending on whether he/she is connecting to a machine in the data center or across a slow WAN.
Default: 3601000 == 3minutes
Determines how server in disconnected state deals with cached output data when the cache becomes filled. Default value is 'block mode' where command execution is blocked after the server side data cache becomes filled.
By default, ProxyAccessType is None, that means Proxy information (ProxyAccessType, ProxyAuthenticationMechanism and ProxyCredential)is not passed to WSMan at all.
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:
Default is Negotiate.
The following is the definition of the input parameter "ProxyCredential".
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
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.
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
UI culture that the remote session should use
Indicates the request is encoded in UTF16 format rather than UTF8 format; UTF8 is the default.