How to Enable and Configure SMB Compression in Windows 11

Transferring multi-gigabyte virtual hard disks (VHDX), ISO images, uncompressed database dumps, and virtual machine images across local networks or remote VPN connections frequently saturates available network bandwidth. In enterprise environments, network interfaces and router uplinks often become performance bottlenecks long before modern multi-core CPUs reach capacity.

Windows 11 and Windows Server 2022/2025 introduce native SMB Compression (Server Message Block compression). This feature removes the need to manually zip or archive files prior to transmission. Instead, the SMB client and server dynamically compress files on the fly during transfer using modern compression algorithms (such as XPRESS, LZNT1, and XPRESS-LZ77), transferring significantly fewer bytes over the wire and reconstructing the files in real time on the target storage.

How SMB Compression Operates

SMB Compression requires both the client and the file server to support SMB 3.1.1. By default, SMB evaluates the compressibility of the data being sent. If a file is already compressed (such as JPEG images, MP4 video streams, or modern ZIP/7z archives), SMB compression automatically bypasses compression to prevent unnecessary CPU overhead.

When compressible data is identified, SMB compresses data blocks before transmitting them across the network interface, resulting in up to 3x to 5x faster transfer times across 1Gbps and 10Gbps enterprise networks.

Enabling SMB Compression on Windows Shares via PowerShell

To enable compression on an existing or new network file share hosted on Windows:

  1. Right-click the Start button and select Terminal (Admin) or PowerShell (Admin).
  2. To inspect existing shares and their compression state, run:
    Get-SmbShare | Select-Object Name, Path, CompressData
  3. To enable compression on an existing share (for example, named Deployments):
    Set-SmbShare -Name "Deployments" -CompressData $true
  4. When creating a brand-new share with compression pre-enabled:
    New-SmbShare -Name "Backups" -Path "D:Backups" -CompressData $true -FullAccess "Authenticated Users"

Requesting SMB Compression from the Client Side

Even if a file share has compression enabled, the SMB client must request compression during the file session. You can configure this globally or request it per mapped drive:

Mapping a Network Drive with Forced Compression

To mount a network share and force the client to request compression on every read and write operation:

# Map network drive Z: with compression requested
net use Z: \\fileserver.local\Backups /requestcompression:yes

Alternatively, using PowerShell’s native New-SmbMapping cmdlet:

New-SmbMapping -LocalPath "Z:" -RemotePath "\\fileserver.local\Backups" -CompressData $true

Enabling SMB Compression via Group Policy (Domain and Local)

For domain administrators wishing to enforce or permit SMB compression across all Windows 11 workstations:

  1. Press Win + R, type gpedit.msc, and press Enter to open the Local Group Policy Editor (or open GPMC on your Domain Controller).
  2. Navigate to the following policy branch:
    Computer Configuration > Administrative Templates > Network > Lanman Workstation
  3. Locate the policy setting named Enable SMB compression.
  4. Double-click the policy, select Enabled, and click Apply.
  5. Next, navigate to:
    Computer Configuration > Administrative Templates > Network > Lanman Server
  6. Locate and enable Enable SMB compression for incoming server connections.
  7. Open an elevated command prompt and apply the policy update immediately:
    gpupdate /force

Using Robocopy with SMB Compression

For large-scale data migrations, automated nightly scripts, and administrative sync tasks, the built-in robocopy utility includes a dedicated /compress switch that guarantees compression requests regardless of default share configuration:

robocopy "C:VirtualMachines" "\\fileserver.local\VMStorage" *.vhdx /compress /z /mt:8

In this command:

  • /compress: Enforces SMB network compression during transmission.
  • /z: Copies files in restartable mode (resumes interrupted transfers).
  • /mt:8: Utilises 8 parallel threads to maximise throughput.

Verifying SMB Compression in Performance Monitor

To confirm that files are actively compressing over the wire:

  1. Press Win + R, type perfmon, and press Enter.
  2. Click Performance Monitor in the left pane.
  3. Click the green + icon on the toolbar to add counters.
  4. Scroll down to SMB Client Shares or SMB Server Shares.
  5. Select Compressed Requests/sec and Compressed Bytes/sec.
  6. Click Add >>, then click OK.

Initiate a large uncompressed file transfer; you will observe the real-time compression counters spike, validating bandwidth conservation.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.