Automatically installing the correct WinSCP version for BizTalk Server 2016 and 2020

  • Sandro Pereira
  • Jan 26, 2026
  • 3 min read

Configuring SFTP support in BizTalk Server requires WinSCP, but determining which WinSCP version to install has historically been more complicated than it should be. The correct version depends not only on whether you are running BizTalk Server 2016 or 2020, but also on the Cumulative Update (CU) and Feature Pack / Feature Update level installed.

Over the years, this has led to many manual checks, trial-and-error installations, and inconsistencies between environments. To address this problem, a PowerShell script was created to automate the entire process—and I’ve recently updated it to support BizTalk Server 2020 CU5 and CU6.

The challenge with WinSCP and BizTalk

BizTalk relies on WinSCP for SFTP connectivity, but:

  • Different BizTalk versions require different WinSCP builds
  • CU and Feature Pack levels matter
  • Installing the wrong version can cause runtime issues
  • Official documentation does not always clearly map BizTalk versions to WinSCP versions

As a result, ensuring the correct and supported WinSCP version is installed has often been error-prone.

The automated solution

To simplify this process, the InstallWinSCPForBizTalk.ps1 script was created.

This script:

  1. Detects the installed BizTalk Server version
  2. Identifies the most recent Cumulative Update and Feature Pack / Feature Update
  3. Downloads NuGet
  4. Uses NuGet to retrieve the correct WinSCP version
  5. Copies WinSCP into the BizTalk Server installation directory

If the correct WinSCP version is already present, no changes are made.

How the script works

  • The script must be run in an administrative PowerShell session
  • The user must have write access to:
    • The BizTalk Server installation folder
    • A temporary working directory
  • By default, the script uses the user’s TEMP folder and creates a subfolder named nuget
  • Temporary files are not deleted automatically after execution

Note: This behavior is intentional to allow inspection and reuse in offline scenarios.

Using the script in production

This script is designed for production use, including environments with internet access. However, THIS POWERSHELL SCRIPT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

Offline support is possible.

Recommended approach

  1. Run the script in a test environment that matches production:
    • Same BizTalk version
    • Same Cumulative Update level
  2. Specify a local folder using the -nugetDownloadFolder parameter
  3. Copy that folder to the production environment
  4. Run the script again in production, pointing -nugetDownloadFolder to the copied folder

In this scenario:

  • The script detects that NuGet and WinSCP are already available locally
  • No internet access is required
  • Files are copied directly to the BizTalk installation directory

Background and credits

Credits to Michael Stepensen, Nicolas Blatter, Niclas Öberg, and Tom Canter for supporting this script over the years.

Latest update: BizTalk Server 2020 CU5 and CU6 support

I have recently updated the script to support:

  • BizTalk Server 2020 CU5
  • BizTalk Server 2020 CU6

The updated script is available on GitHub:

👉 https://github.com/BizTalkCommunity/BizTalkWinSCPInstaller

If you are running BizTalk Server 2020 with recent cumulative updates, make sure you are using the latest version of the script.

Download

THIS POWERSHELL SCRIPT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

You can download the PowerShell Script used from GitHub here:

Hope you find this helpful! If you enjoyed the content or found it useful, and wish to support our efforts to create more, you can contribute to purchasing a Star Wars Lego set for my son!

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top