示例#1
0
 /// <summary>
 /// Executes the script given by the scriptFileName
 /// </summary>
 /// <param name="scriptFileName">Powershell script file that needs to be executed.</param>
 /// <param name="argument">Arguments for the script file.</param>
 /// <returns>true, if the last line of the script returns PASS. Otherwise false</returns>
 public static bool ExecuteScript(string scriptFileName, string argument)
 {
     return(PSScriptExecutor.ExecuteScript(scriptFileName, argument, TimeSpan.FromMinutes(2)));
 }
示例#2
0
 /// <summary>
 /// Executes the script given by the scriptFileName
 /// </summary>
 /// <param name="scriptFileName">Powershell script file that needs to be executed.</param>
 /// <returns>true, if the last line of the script returns PASS. Otherwise false</returns>
 public static bool ExecuteScript(string scriptFileName)
 {
     return(PSScriptExecutor.ExecuteScript(scriptFileName, string.Empty));
 }