I have a simple powershell script to enable a mailbox in Exchange called test.ps1. Here is the script:
add-pssnapin microsoft.exchange.management.powershell.admin Enable-Mailbox -Identity 'gi joe' -database 'myserver\myserver mailbox database 17'
If I go to the Powershell console and type
./test.ps1
It will run successfully. However, if I call it in VB.net using
Process.Start("powershell", "test.ps1")
the terminal flashes too quickly for me to see what it says, and it doesn't create the mailbox. Why does this happen, or how can I stop the terminal from disappearing before I can read the error?