PowershellSettings Class

Summary

The settings used when running powershell processes.
Assembly
Cake.Powershell.dll
Namespace
Cake.Powershell
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["PowershellSettings"] class Type type-node

Syntax

public class PowershellSettings

Constructors

Name Summary
PowershellSettings() Initializes a new instance of the PowershellSettings class.

Properties

Name Value Summary
Arguments ProcessArgumentBuilder
Gets or sets the set of command-line arguments to use when starting the application.
AuthenticationMechanism AuthenticationMechanism
Gets or sets the authentication mechanism to use when connecting
BypassExecutionPolicy bool
Bypass Execution Policy if true
ComputerName string
Gets or sets optional computer name to run the process on
ExceptionOnScriptError bool
If true script execution which have errors will throw exception, If false it will return result. Default: true
FormatOutput bool
If the powershell output should be a formatted string
LogOutput bool
Log the powershell output
Modules IList<string>
Gets or sets the modules to load into the initial state
OutputToAppConsole bool
If the host should output to the app's console
Password string
Gets or sets the credentials to use when connecting
Port int
Gets or sets the remote port to connect on
Timeout Nullable<int>
Gets or sets optional timeout for process execution
UseDotSourcing bool
Gets or sets a value indicating to use dot sourcing when executing scripts.
Username string
Gets or sets the credentials to use when connecting
WorkingDirectory DirectoryPath
Gets or sets the working directory for the process to be started.

Extension Methods

Name Value Summary
BypassExecutionPolicy() PowershellSettings
Sets a value indicating whether security should be set to unrestricted.
Requires the Cake.Powershell addin
Dump<PowershellSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<PowershellSettings>(PowershellSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<PowershellSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<PowershellSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
OutputToAppConsole(bool) PowershellSettings
Sets a value indicating whether the output of an application is written to its on-screen console.
Requires the Cake.Powershell addin
SetFormatOutput(bool) PowershellSettings
Sets a value indicating whether the output of an application should be formatted as text
Requires the Cake.Powershell addin
SetLogOutput(bool) PowershellSettings
Sets a value indicating whether the output of an application is written to the cake console
Requires the Cake.Powershell addin
SetTimeout(int) PowershellSettings
Sets the optional timeout for powershell command
Requires the Cake.Powershell addin
ThrowIfNull<PowershellSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<PowershellSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
UseAuthenticationMechanism(AuthenticationMechanism) PowershellSettings
Sets the authentication mechanism to use when connecting
Requires the Cake.Powershell addin
UseComputerName(string) PowershellSettings
Sets the computer name to connect to
Requires the Cake.Powershell addin
UsePassword(string) PowershellSettings
Gets or sets the credentials to use when connecting
Requires the Cake.Powershell addin
UsePort(int) PowershellSettings
Sets the remote port to connect on.
Requires the Cake.Powershell addin
UseUsername(string) PowershellSettings
Gets or sets the credentials to use when connecting
Requires the Cake.Powershell addin
UseWorkingDirectory(DirectoryPath) PowershellSettings
Sets the working directory for the process to be started.
Requires the Cake.Powershell addin
WithArguments(Action<ProcessArgumentBuilder>) PowershellSettings
Sets the arguments for the powershell command
Requires the Cake.Powershell addin
WithDotSourcing() PowershellSettings
Executes scripts using dot sourcing
Requires the Cake.Powershell addin
WithModule(string) PowershellSettings
Adds the specified module to load into the initial state
Requires the Cake.Powershell addin