powershell.exe -noexit -file "c:\test.ps1" -sta
Source: cmd – My PowerShell script only works when running from ISE – Stack Overflow
powershell.exe -noexit -file "c:\test.ps1" -sta
Source: cmd – My PowerShell script only works when running from ISE – Stack Overflow