Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Easily Find the PowerShell ApartmentState

$
0
0

Summary: Easily find the Windows PowerShell ApartmentState.

Hey, Scripting Guy! Question How can I easily find the Windows PowerShell ApartmentState?

Hey, Scripting Guy! Answer Use the $host automatic variable, and select the ApartmentState property from the RunSpace object, as shown here.

PS C:\> $Host.RunSpace.ApartmentState

STA


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>