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:
- Detects the installed BizTalk Server version
- Identifies the most recent Cumulative Update and Feature Pack / Feature Update
- Downloads NuGet
- Uses NuGet to retrieve the correct WinSCP version
- 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
- Run the script in a test environment that matches production:
- Same BizTalk version
- Same Cumulative Update level
- Specify a local folder using the
-nugetDownloadFolderparameter - Copy that folder to the production environment
- Run the script again in production, pointing
-nugetDownloadFolderto 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!