pub struct PsScriptBuilder { /* private fields */ }
Expand description

Builds a PsScript instance with configurable options for running your script.

Implementations

Creates a default builder with no_profile, non_interactive and hidden options set to true and print_commands set to false.

Prevents environment specifc scripts from being loaded. See NoProfile parameter

Runs the script in non-interactive mode, which does not present an interactive prompt to the user. See NonInteractive flag

Prevents PowerShell window from being shown by creating a console window with the CREATE_NO_WINDOW flag set. See creation flags

Note

On any other platform than Windows this is currently a no-op.

If set to true it will print each command to stdout as they’re run. This can be particularely useful when debugging.

Trait Implementations

Creates a default builder with no_profile, non_interactive and hidden options set to true and print_commands set to false.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.