I have a PS script (myscript.ps1) that runs fine when launched from the PS command line. However, when I launch it from a Visual Studio app using the following code, the PS blue screen flashes quickly but nothing else happens (the expectation is the creation of a file). There doesn't appear to be any errors but I suspect one is listed in PS's blue screen.
Btw, launching PS scripts from VS is new to me, although I have set PS's rights and it's trusted folders already.
Process.Start("powershell", "-noexit -file 'c:\Temp\myScript.ps1'")