PSSessionOption.CancelTimeout Property
Definition
Important
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.
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 is not responding.
Default: 60 * 1000 = 1 minute.
public:
property TimeSpan CancelTimeout { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan CancelTimeout { get; set; }
member this.CancelTimeout : TimeSpan with get, set
Public Property CancelTimeout As TimeSpan