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.

InitialSessionState.ApartmentState Property

 

Updated: April 27, 2016

Applies To: Windows PowerShell

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

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

Public Property ApartmentState As ApartmentState

Property Value

Type: System.Threading.ApartmentState

A ApartmentState constant that identifies the apartment state of the thread used to run commands in the runspace, such as STA (the thread will create and enter a single-threaded apartment) or MTA (the thread will create and enter a multi-threaded apartment).

Return to top

Community Additions

Show: