1860 words
9 minutes
Integrating a Brother Scanner with SharePoint Using IIS FTP and Power Automate

Introduction#

As our organization gradually migrated its document storage to SharePoint Online, we encountered a new challenge.

Traditional multifunction printers (MFPs) typically support:

  • Scan to Email
  • Scan to SMB
  • Scan to FTP

However, most Brother printers—especially entry-level and mid-range models—do not support scanning directly to SharePoint Online.

Continuing to use a traditional SMB shared folder would mean scanned documents remain outside the SharePoint ecosystem, losing the benefits of centralized permission management, version control, and collaboration.

Our objective was straightforward:

Keep the scanning experience unchanged for end users while ensuring every scanned document ultimately ends up in SharePoint.


Solution Architecture#

After evaluating several options, we adopted the following architecture:

Brother Scanner
Scan to FTP
Windows Server IIS FTP
Power Automate
SharePoint Document Library

The entire process is completely transparent to end users.

Users simply select Scan to FTP on the Brother printer.

The system automatically performs the remaining tasks:

  1. Save the scanned document to the FTP server.
  2. Detect the newly created file.
  3. Upload it to the designated SharePoint document library.

No manual intervention is required.


Environment#

Server

  • Windows Server 2016 Standard

Printer

  • Brother DCP-L2640DW

Automation

  • Microsoft Power Automate
  • On-premises Data Gateway

Destination

  • SharePoint Online

FTP Server

  • IIS FTP Server

Installing IIS FTP#

Windows Server does not install the FTP service by default.

Open Server Manager and launch the Add Roles and Features Wizard.

Server Manager
Add Roles and Features

Select:

Web Server (IIS)

Under Role Services, install the FTP components in addition to the default IIS features:

Web Server (IIS)
├── Common HTTP Features
├── Health and Diagnostics
├── Performance
├── Security
├── ...
└── FTP Server
├── FTP Service
└── FTP Extensibility

These two components serve different purposes:

  • FTP Service provides the core FTP functionality.
  • FTP Extensibility enables advanced authentication methods and future extensibility, so it is recommended to install it together with the FTP Service.

After the installation completes, a new FTP Sites node will appear in IIS Manager.


Creating an FTP Site#

In this solution, the FTP server is used only as a temporary staging area for scanned documents.

Create a dedicated directory on the server:

C:\FTPScan

Then open IIS Manager:

Server Manager
Tools
Internet Information Services (IIS) Manager

Expand the server node:

PRINTER

Right-click Sites and select:

Add FTP Site...

Configure the site using the following settings:

Site Name
Scanner FTP
Physical Path
C:\FTPScan
IP Address
192.168.x.x
Port
21
SSL
No SSL
NOTE

Why not use FTPS?

The Brother DCP-L2640DW supports standard FTP out of the box, while FTPS (FTP over SSL) compatibility varies depending on the printer model and firmware version.

Since our initial goal was to validate the complete workflow, we chose standard FTP for the first deployment. Because both the FTP server and the printer reside within the internal corporate network, this approach provides a reasonable balance between simplicity and functionality.

If security or compliance requirements change in the future, upgrading to FTPS can be considered without changing the overall architecture.

For authentication, select:

Basic Authentication

For authorization:

Specified users

Grant access only to the dedicated FTP account used by the scanner.


Creating a Dedicated FTP Account#

Instead of using an administrator account, create a dedicated local user with the minimum permissions required.

Open:

Computer Management
Local Users and Groups
Users
New User...

Create the following account:

Username
scanftp

Using a dedicated account follows the principle of least privilege and simplifies future auditing and maintenance.


Planning the Directory Structure#

Although this deployment initially included only a single printer, it is worth planning a scalable directory structure from the beginning.

For example:

C:\FTPScan
├── MTL-P73
├── MTL-P74
├── QC-P01
└── HR

Each Brother printer is configured to use its own Store Directory.

For example:

Store Directory
MTL-P73

This allows Power Automate to monitor different folders and automatically upload documents to different SharePoint document libraries without requiring any changes to the printer configuration.

It also makes the solution easy to expand as additional printers are deployed.

Troubleshooting #1: Windows Defender Firewall#

Local FTP testing worked perfectly.

However, client computers were unable to connect to the FTP server.

Verify the FTP Service, FTP Site, and Port 21#

Run the following commands on the FTP server:

Terminal window
PS C:\Windows\system32> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows Server 2016 Standard
OS Version: 10.0.14393 N/A Build 14393
PS C:\Windows\system32> Get-Service ftpsvc
Status Name DisplayName
------ ---- -----------
Running ftpsvc Microsoft FTP Service
PS C:\Windows\system32> Get-WebSite
Name ID State Physical Path Bindings
---- -- ----- ------------- --------
Default Web Site 1 Started %SystemDrive%\inetpub\wwwroot http *:80:
Scanner FTP 2 Started C:\FTPScan ftp 192.168.1.129:21:
PS C:\Windows\system32> netstat -ano | findstr :21
TCP 0.0.0.0:21 0.0.0.0:0 LISTENING
TCP [::]:21 [::]:0 LISTENING

Analysis#

✅ The FTP service is running.

Running ftpsvc

✅ The FTP Site has started successfully.

Scanner FTP Started

✅ Port 21 is listening.

0.0.0.0:21 LISTENING

At this point, there were no obvious issues on the server side.

Test the TCP Connection#

Open PowerShell on a client computer and run:

Terminal window
Test-NetConnection 192.168.1.129 -Port 21

Output:

Terminal window
WARNING: TCP connect to (192.168.1.129 : 21) failed
ComputerName : 192.168.1.129
RemoteAddress : 192.168.1.129
RemotePort : 21
SourceAddress : 192.168.1.191
PingSucceeded : True
TcpTestSucceeded : False

Check the Firewall Rules#

Run the following command on the FTP server:

Terminal window
Get-NetFirewallRule -DisplayGroup "FTP Server" | Select DisplayName, Enabled

Output:

Terminal window
DisplayName Enabled
----------- -------
FTP Server (FTP Traffic-In) True
FTP Server (FTP Traffic-Out) True
FTP Server Secure (FTP SSL Traffic-In) True
FTP Server Secure (FTP SSL Traffic-Out) True
FTP Server Passive (FTP Passive Traffic-In) True

Everything appeared to be configured correctly.

NOTE

Since this server is joined to an Active Directory domain, we suspected that the Domain Firewall Profile might be blocking FTP traffic.

To verify this assumption, we temporarily disabled the Domain Firewall Profile.

Run:

Terminal window
Set-NetFirewallProfile -Profile Domain -Enabled False

After disabling the Domain Firewall Profile, the result changed to:

TcpTestSucceeded : True

This confirmed that:

Windows Defender Firewall (or a firewall policy applied through Group Policy) was blocking the FTP connection.

Do Not Leave the Firewall Disabled#

Re-enable the firewall:

Terminal window
Set-NetFirewallProfile -Profile Domain -Enabled True

Instead of relying on the firewall rules created automatically by IIS, we created an explicit inbound rule for FTP.

Run:

Terminal window
New-NetFirewallRule `
-DisplayName "Scanner FTP 21" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 21 `
-Action Allow `
-Profile Domain

After adding this firewall rule, FTP connections worked successfully.

Troubleshooting #2: FTP Passive Mode#

After resolving the firewall issue, the client was finally able to establish an FTP connection.

However, a new problem appeared.

The FTP session could be established successfully, but file uploads still failed.

At this point, we knew that:

  • Port 21 was reachable.
  • The FTP service was running normally.
  • Authentication succeeded.

The problem occurred after the control connection had been established.


Understanding FTP Passive Mode#

FTP uses two separate connections:

  • Control Connection (TCP 21)
  • Data Connection (a dynamically assigned TCP port)

When using Passive Mode, the server opens a random TCP port for the data connection.

If these dynamic ports are not allowed through the firewall, the FTP client can log in successfully but will fail when transferring files.

This is a common issue when deploying an FTP server on Windows Server.


Configure a Passive Port Range#

Open IIS Manager.

Select the server node, then open:

FTP Firewall Support

Configure a dedicated passive port range.

For example:

Data Channel Port Range
50000-50050

Using a fixed range makes firewall configuration much simpler than allowing all dynamic ports.


Allow the Passive Ports Through Windows Firewall#

After configuring the passive port range in IIS, Windows Defender Firewall must also allow those ports.

Run:

Terminal window
New-NetFirewallRule `
-DisplayName "FTP Passive Ports" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 50000-50050 `
-Action Allow `
-Profile Domain

Restart FTP service

Restart-Service ftpsvc

Printer Configuration#

Configuring the Brother printer is very straightforward.

FTP Server:

192.168.x.x

Port:

21

Passive Mode:

Enable

Store Directory:

MTL-P73

For the Username and Password, enter the local account that was created earlier.

One thing to note is:

The Store Directory is a path relative to the FTP Root.

For example:

Root
C:\FTPScan

Store Directory:

MTL-P73

The actual file storage location will be:

C:\FTPScan\MTL-P73

Power Automate#

Since the files are stored on a local server, we used:

On-premises Data Gateway

to connect to the local file system.

The Flow itself is very simple:

When a file is created
Get file content
Create file (SharePoint)

No scripts are required.

The entire workflow uses only Microsoft official connectors.

Step 1: Verify that the Gateway Is Installed#

Do not create the Flow yet.

On the server (PRINTER), first verify whether the following is already installed:

On-premises data gateway

Search the Start menu for:

gateway

If you see:

On-premises data gateway

then it is already installed.

If not, install it first.

Download it from:

https://aka.ms/onpremgateway

During the installation, configure the following:

  • Mode: Standard
  • Sign in with your [email protected]
  • Gateway Name: For example, PRINTER-GW
  • Recovery Key: Create a strong password and store it securely. It will be required if the Gateway needs to be migrated or restored in the future.

Step 2: Create an Automated Cloud Flow#

Open:

https://make.powerautomate.com

Then navigate to:

CreateAutomated cloud flow

Enter the following:

Flow Name

FTP Scan to SharePoint

Choose your flow’s trigger

Search for:

File System

Select:

When a file is created (properties only)

Step 3: Create the Connection#

FieldValue
Connection namePRINTER File System
Root folderC:\FTPScan
Authentication TypeWindows
UsernameThe local account created earlier
PasswordThe password for the Windows account
GatewaySelect the PRINTER-GW gateway created earlier

Step 4: Configure the Trigger#

Trigger:

When a file is created (properties only)

Folder#

Click the folder icon on the right (if available), or manually enter the path relative to the Root Folder:

/MTL-P73

Since the Root Folder is already:

C:\FTPScan

the Trigger is actually monitoring:

C:\FTPScan\MTL-P73

Step 5: Add the File Content Action#

Click the button in the middle.

Select:

Add an action

Search for:

File System

Select:

Get file content

For Get file content → File, select:

body/Id

After that, click the button below to add the next action:

SharePoint — Create file

Configure the action:

For File Name and File Content, select the dynamic content returned by Get file content.

Click Save in the upper-right corner to save the Flow.

The final Power Automate workflow is:

When a file is created (properties only)
Get file content
SharePoint Create file

Final Result#

The final workflow becomes:

Scan
FTP
Power Automate
SharePoint

For end users, nothing changes in the scanning process.

However, every scanned document is ultimately stored in SharePoint, where it benefits from:

  • Permission management
  • Online collaboration
  • Version control
  • Centralized Microsoft 365 management

Throughout the entire deployment, the printer does not need to support SharePoint, nor is any third-party software required.

This approach is also easy to replicate for other printers.

Toolbox#

The following PowerShell and Windows commands were used throughout this deployment and can serve as a reference for future deployments and troubleshooting.


1. Check the FTP Service Status#

Verify that the IIS FTP service is running.

Terminal window
Get-Service ftpsvc

Start the FTP service:

Terminal window
Start-Service ftpsvc

Stop the FTP service:

Terminal window
Stop-Service ftpsvc

Restart the FTP service:

Terminal window
Restart-Service ftpsvc

2. Check Whether Port 21 Is Listening#

Verify that the FTP server is listening on TCP port 21.

Terminal window
netstat -ano | findstr :21

If you see:

LISTENING

then IIS has successfully bound to port 21.


3. Test Network Connectivity#

Verify that the client can reach the FTP server.

Terminal window
Test-NetConnection 192.168.x.x -Port 21

Pay attention to:

TcpTestSucceeded
  • True — Network connectivity is working.
  • False — Continue troubleshooting the firewall or network configuration.

4. Test FTP Login#

Use the built-in Windows FTP client to test the connection.

Terminal window
ftp 192.168.x.x

After logging in successfully, use:

Terminal window
dir

to list the directory contents.

Exit the session with:

Terminal window
bye

5. Check the Windows Firewall Status#

View the status of all Firewall Profiles.

Terminal window
Get-NetFirewallProfile

6. Temporarily Disable the Firewall (Troubleshooting Only)#

Use this only to verify whether the firewall is causing the issue.

Terminal window
Set-NetFirewallProfile -Profile Domain -Enabled False

Re-enable it afterward:

Terminal window
Set-NetFirewallProfile -Profile Domain -Enabled True

It is not recommended to leave the firewall disabled. This should only be used for troubleshooting.


7. Create an FTP Firewall Rule#

Allow the FTP control connection (TCP 21).

Terminal window
New-NetFirewallRule `
-DisplayName "Scanner FTP" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 21 `
-Action Allow `
-Profile Domain

8. View Firewall Rules#

List all FTP-related firewall rules.

Terminal window
Get-NetFirewallRule |
Where-Object DisplayName -like "*FTP*"

It is recommended to troubleshoot in the following order instead of changing multiple settings at the same time:

  1. Is the FTP service running?
  2. Is port 21 listening?
  3. Can you log in to the FTP server locally?
  4. Does Test-NetConnection succeed?
  5. Is the firewall blocking the connection?
  6. Is Passive Mode configured correctly?
  7. Does the Brother FTP Test pass?
  8. Is the file successfully written to the FTP Root?
  9. Is Power Automate triggered?
  10. Does the file successfully appear in SharePoint?

Following this sequence makes it much easier to isolate the root cause and avoids making unnecessary configuration changes.

Integrating a Brother Scanner with SharePoint Using IIS FTP and Power Automate
https://blog.drcharon.com/en/posts/Printer-FTP-Sharepoint/
Author
Charon
Published at
2026-07-22
License
CC BY-NC-SA 4.0