[−][src]Function powershell_script::run
pub fn run(script: &str, print_commands: bool) -> Result<Output, PsError>
Runs a script in PowerShell. Returns an instance of Output. In the case of
a failure when running the script it returns an PsError::Powershell(Output)
which holds the output object containing the captures of stderr and stdout
for display. The flag print_commands can be set to true if you want each
command to be printed to the stdout of the main process as theyre run. Useful
for debugging scripts.
Panics
If there is an error retrieving a handle to stdin in the child process.