Executes PowerShell scripts and returns the results.
The PowerShell BizTalk Adapter is a BizTalk Server transmit adapter that will execute PowerShell scripts whenever BizTalk sends a message through it. This allows for easy creation of custom processing scripts for BizTalk messages that are completely integrated into your BizTalk solution.
Setting up the Adapter
To use the PowerShell BizTalk Adapter, it's necessary to do the following:
- Create a new Send Port in your BizTalk application
- Select the PowerShell BizTalk Adapter as the adapter to use in the port
- Configure the Adapter settings with the following:
- A name that identifies this send port
- The PowerShell script to execute when a message is sent; this can be the script itself or the dot-source for an external script file
- Optionally, to pass additional input data to the script, fill in the Variables property; this should be a list of 'name=value' pairs, one per line, and each one will be visible in the PowerShell script as a variable called $name
Accessing the BizTalk Message
Detailed information about accessing BizTalk message properties can be found under the Script property.
The Adapter provides an easy way for scripts to generate diagnostics data that can be used to troubleshoot their behavior, by providing ways for the scripts to write diagnostic messages directly to the Adapter log.
This is exposed to the script through the Write-Debug, Write-Warning and Write-Verbose cmdlets, or as an alternative, by calling the corresponding functions in $host.UI.
Executing Scripts on Remote Machines
Detailed information on remote execution can be found under the Host property.
Sender Property List
The following is the full list of the properties of the sender adapter with short descriptions. Click on the links for further details.
|Firewall||A set of properties related to firewall access.|
|Host||The host where the command should be executed.|
|MaxThreads||The maximum number of threads that the adapter may consume.|
|MaxTransmissionBatchSize||The maximum number of messages that can be sent in a single batch.|
|Other||Defines a set of configuration settings to be used by the adapter.|
|Password||The password to use when executing commands remotely.|
|Port||The TCP port number to use for remote connections.|
|PortName||A unique name assigned to this send port.|
|Protocol||The protocol to use for executing remote commands.|
|Script||The PowerShell script to execute.|
|SSHAcceptServerHostKey||Instructs the adapter to accept the server host key that matches the supplied key.|
|SSHAuthMode||The type of authentication used by the adapter.|
|SSHCert||The certificate to use for client authentication during the SSH handshake.|
|SSHCompressionAlgorithms||A comma-separated list of compression algorithms allowed for this connection.|
|Timeout||A timeout for the adapter.|
|TransmitBatchMode||How the transmitter processes batches.|
|TransportLog||Tells the adapter where and how to report information about its operations.|
|URI||The Uniform Resource Identifier (URI) of the send port or receive location.|
|User||The username to use when executing commands remotely.|
|Variables||Variables to add to the PowerShell Runspace before executing the command.|
The following is a list of configuration settings for the adapter with short descriptions. Click on the links for further details.
|ReportScriptError||Whether script errors cause a failure.|
|LogSSHPackets||If True, detailed SSH packet logging is performed.|
|SSHAcceptServerHostKeyFingerPrint||Instructs the adapter to accept the server's host key with this fingerprint.|
|SSHEncryptionAlgorithms||A comma-separated list containing all allowable compression algorithms.|
|SSHKeyExchangeAlgorithms||Specifies the supported key exchange algorithms.|
|SSHMacAlgorithms||Specifies the supported Mac algorithms.|
|SSHPublicKeyAlgorithms||Specifies the supported public key algorithms.|
|SSHPubKeyAuthSigAlgorithms||Specifies the signature algorithm when attempting public key authentication.|
|AbsoluteTimeout||Determines whether timeouts are inactivity timeouts or absolute timeouts.|
|LocalHost||The name of the local host or user-assigned IP interface through which connections are initiated or accepted.|
|TcpNoDelay||Whether or not to delay when sending packets.|
|UseInternalSecurityAPI||Tells the adapter whether or not to use the system security libraries or an internal implementation.|
|PersistedConnectionTimeout||How long to leave a persisted connection alive.|