Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

Microsoft Powershell Connector Reference

Configuration

Parameters

Name Type Description Default Value Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

  • Linux Configuration

  • Windows Configuration

The connection types that can be provided to this configuration.

x

Expiration Policy

ExpirationPolicy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before the runtime considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. The runtime purges instances as it sees fit.

Connection Types

Linux Configuration

Parameters

Name Type Description Default Value Required

IPAddress

String

Host used to initialize the session.

x

UserName

String

Username used to initialize the session.

x

Password

String

Password used to authenticate the user.

x

Reconnection

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Windows Configuration

Parameters

Name Type Description Default Value Required

IPAddress

String

Host used to initialize the session.

x

UserName

String

Username used to initialize the session.

x

Password

String

Password used to authenticate the user.

x

Reconnection

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

Associated Operations

  • executeCommand

  • executeScriptFile

Operations

Execute Command

<powershell:execute-command>

This operation executes the command on the machine.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

Command

String

The command to Execute on the client machine.

x

Target Variable

String

The name of a variable on which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output. The outcome of that expression is stored in the target variable.

#[payload]

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors

Output

Type String

For Configurations

  • config

Throws

  • POWERSHELL:RETRY_EXHAUSTED

  • POWERSHELL:CONNECTIVITY

Execute Script File

<powershell:execute-script-file>

This operation executes the script file.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x

File Content

Binary

The file which contains the script.

#[payload]

Parameters

Object

The Parameters for the Script.

Target Variable

String

The name of a variable on which the operation’s output is placed.

Target Value

String

An expression to evaluate against the operation’s output. The outcome of that expression is stored in the target variable.

` #[payload]`

Reconnection Strategy

  • reconnect

  • reconnect-forever

A retry strategy in case of connectivity errors.

Output

Type String

For Configurations

  • config

Throws

  • POWERSHELL:RETRY_EXHAUSTED

  • POWERSHELL:CONNECTIVITY

Types

Reconnection

Field Type Description Default Value Required

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

  • reconnect

  • reconnect-forever

The reconnection strategy to use.

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often (in milliseconds) to reconnect.

Count

Number

How many reconnection attempts to make.

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often (in milliseconds) to reconnect.

Expiration Policy

Field Type Description Default Value Required

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute.