Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

PSThreadOptions Enumeration


Updated: April 27, 2016

Applies To: Windows PowerShell

Defines how threads are created and used when a command is executed within a runspace. This enumeration is introduced in Windows PowerShell 2.0.

Namespace:   System.Management.Automation.Runspaces
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public enum PSThreadOptions

Member nameDescription

Use the default options: UseNewThread for local Runspace, ReuseThread for local RunspacePool, server settings for remote Runspace and RunspacePool


Creates a new thread for the first invocation and then re-uses that thread in subsequent invocations.


Doesn’t create a new thread; the execution occurs on the thread that calls Invoke.


Creates a new thread for each invocation

Return to top