0

I am writing a Powershell script utilizing WPF with the methods shown here: http://learn-powershell.net/2012/10/14/powershell-and-wpf-writing-data-to-a-ui-from-a-different-runspace/.

My script runs perfectly when I execute it from the within Powershell comand line as ".\Test.ps1." If I attempt to launch the same script from, for instance, a batch file like so:

powershell.exe -file D:\Test.ps1

Powershell launches and shortly exits thereafter, without displaying the GUI. I'm guessing this has something to do with the runspaces but any suggestions would be greatly appreciated.

Thanks!

cjones26
  • 3,459
  • 1
  • 34
  • 51

0 Answers0