PowerShell Quick Tip: Determine STA Threading Mode

Some code in PowerShell requires you to use the Single-Threaded Apartment (STA) threading model. The PowerShell version 2.0 console host uses Multi-Threaded Apartment by default. The PowerShell Integrated Scripting Environment (ISE) uses the STA threading model. If you’re writing code using the WPK module included in the PowerShellPack, you will need to ensure that you … Read morePowerShell Quick Tip: Determine STA Threading Mode