Freigeben über


NewPSSessionOptionCommand.CancelTimeout Property

Definition

The duration for which PowerShell should wait (in milliseconds) 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.

public:
 property int CancelTimeout { int get(); void set(int value); };
public:
 property int CancelTimeout { int get(); void set(int value); };
public int CancelTimeout { get; set; }
[System.Management.Automation.Alias(new System.String[] { "CancelTimeoutMSec" })]
[System.Management.Automation.Parameter]
[System.Management.Automation.ValidateRange(0, 2147483647)]
public int CancelTimeout { get; set; }
member this.CancelTimeout : int with get, set
[<System.Management.Automation.Alias(new System.String[] { "CancelTimeoutMSec" })>]
[<System.Management.Automation.Parameter>]
[<System.Management.Automation.ValidateRange(0, 2147483647)>]
member this.CancelTimeout : int with get, set
Public Property CancelTimeout As Integer

Property Value

Attributes

Applies to