I have the below code,
var process = new System.Diagnostics.Process();
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process.StartInfo.FileName = "powershell.exe";
process.StartInfo.Arguments = psfile;
process.Start();
process.WaitForExit();
psfile is the path of PowerShell script file.
Nothing happened when I run this code. Anything wrong here?