Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » New-PSSessionOption

New-PSSessionOption - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

New-PSSessionOption

Short description
Creates an object that contains advanced options for a PSSession.

Syntax
New-PSSessionOption [-ApplicationArguments <PSPrimitiveDictionary>] [-CancelTimeout <Int32>] [-Culture <CultureInfo>] [
-IdleTimeout <Int32>] [-IncludePortInSPN] [-MaximumReceivedDataSizePerCommand <Int32>] [-MaximumReceivedObjectSize <Int
32>] [-MaximumRedirection <Int32>] [-NoCompression] [-NoEncryption] [-NoMachineProfile] [-OpenTimeout <Int32>] [-Operat
ionTimeout <Int32>] [-OutputBufferingMode <OutputBufferingMode>] [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthentica
tion <AuthenticationMechanism>] [-ProxyCredential <PSCredential>] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] 
[-UICulture <CultureInfo>] [-UseUTF16] [<CommonParameters>]





Description
The New-PSSessionOption cmdlet creates an object that contains advanced options for a user-managed session ("PSSession"
). You can use the object as the value of the SessionOption parameter of cmdlets that create a PSSession, such as New-P
SSession, Enter-PSSession, and Invoke-Command.


Without parameters, New-PSSessionOption generates an object that contains the default values for all of the options. Be
cause all of the properties can be edited, you can use the resulting object as a template, and create standard option o
bjects for your enterprise.


You can also save a session option object in the $PSSessionOption preference variable. The values of this variable esta
blish new default values for the session options. They effective when no session options are set for the session and th
ey take precedence over options set in the session configuration, but you can override them by specifying session optio
ns or a session option object in a cmdlet that creates a session. For more information about the $PSSessionOption prefe
rence variable, see about_Preference_Variables (http://go.microsoft.com/fwlink/?LinkID=113248).


When you use a session option object in a cmdlet that creates a session, the session option values take precedence over
 default values for sessions set in the $PSSessionOption preference variable and in the session configuration. However,
 they do not take precedence over maximum values, quotas or limits set in the session configuration. For more informati
on about session configurations, see about_Session_Configurations (http://go.microsoft.com/fwlink/?LinkID=145152).