Executing powershell scripts in c#
问题 Below is the script I am using to try and execute my powershell script but whenever i run it i just get a blank command window. C# Code static void Main(string[] args) { string text = System.IO.File.ReadAllText(@"C:\Program Files (x86)\Backup Reporter\Required\edit_website.ps1"); using (PowerShell PowerShellInstance = PowerShell.Create()) { // use "AddScript" to add the contents of a script file to the end of the execution pipeline. // use "AddCommand" to add individual commands/cmdlets to