Expand Minimize
This topic has not yet been rated - Rate this topic

PSThreadOptions Enumeration

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)
'Usage
Dim instance As PSThreadOptions

public enum PSThreadOptions
public enum PSThreadOptions
public enum PSThreadOptions
Member nameDescription
DefaultOn the local computer, operates through UseNewThread for runspaces and ReuseThread for runspace pools. Server settings are used for remote runspaces and runspace pools. This field is introduced in Windows PowerShell 2.0.
ReuseThreadCreates a new thread for the first invocation and then re-uses that thread in subsequent invocations. This field is introduced in Windows PowerShell 2.0.
UseCurrentThreadExecutes on the thread that called the Invoke method. This option is not valid for asynchronous calls. This field is introduced in Windows PowerShell 2.0.
UseNewThreadCreates a new thread for each invocation. This field is introduced in Windows PowerShell 2.0.

 

Target Platforms

Windows 98, Windows 2000 , Windows 2000 Server , Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.