Learn about Windows PowerShell
Summary: Easily find the Windows PowerShell ApartmentState.
How can I easily find the Windows PowerShell ApartmentState?
Use the $host automatic variable, and select the ApartmentState property from the RunSpace object, as shown here.
PS C:\> $Host.RunSpace.ApartmentState
This is a PowerTip that everyone who uses PowerShell needs to know. Cheers, Craig
@Craig Lussier thanks. I am glad you like the tip. I appreciate the feedback.