Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RunspacePool.ApartmentState Property

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Gets and sets the apartment state of the thread used to run the commands in the runspaces of the pool. This property is introduced in Windows PowerShell 2.0.

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

public ApartmentState ApartmentState { get; set; }

Property Value

Type: System.Threading.ApartmentState

Returns an ApartmentState constant that identifies the apartment state of the thread used to run commands in the runspaces of the pool.

Exception Condition
InvalidRunspacePoolStateException

An attempt was made to change the apartment state after opening the runspace.

Return to top

Community Additions

Show: