<# .NOTES Author : Chris Titus @christitustech GitHub : https://github.com/ChrisTitusTech Version 0.0.2 Muilti-Thread and Runspaces addition #> #CREATE HASHTABLE AND RUNSPACE FOR GUI $syncHash = [hashtable]::Synchronized(@{}) $newRunspace =[runspacefactory]::CreateRunspace() $newRunspace.ApartmentState = "STA" $newRunspace.ThreadOptions = "ReuseThread" $newRunspace.Open() $newRunspace.SessionStateProxy.SetVariable("syncHash",$syncHash) $code = { #Build the GUI [xml]$xaml = @"