You can now manage SMB compression in Windows 11 with Group Policy and PowerShell

On September 15 2021, Microsoft announced several changes they started to implement to the SMB protocol on Windows. The new compression algorithm is one of the key changes, which compresses files regardless of its size. The change is now live with recent optional updates.

Earlier, the SMB compression decision algorithm would attempt to compress the first 524,288,000 bytes (500MiB) of a file during transfer and track that at least 104,857,600 bytes (100MiB) compressed within that 500-MB range. If fewer than 100 MiB were compressible, SMB compression stopped trying to compress the rest of the file. If at least 100 MiB compressed, SMB compression attempted to compress the rest of the file. This meant that very large files with compressible data – for instance, a multi-gigabyte virtual machine disk – were likely to compress but a relatively small file – even a very compressible one – would not compress.

Now, if the compression feature is enabled in the OS, Windows 11 will always compress all files.

The new behavior is active starting in KB5016691. You can learn more from this video:

Previously in September Microsoft provided a Registry tweak to manage SMB compression. Now the company offers two more methods to configure the feature.

Group policy

\Computer Configuration\Administrative Templates\Network\Lanman Workstation

  • Disable SMB Compression
  • Use SMB Compression by Default

\Computer Configuration\Administrative Templates\Network\Lanman Server

  • Disable SMB Compression
  • Request traffic compression for all shares

PowerShell for SMB client

Set-SMBClientConfiguration [-EnableCompressibilitySampling <bool>] [-CompressibilitySamplingSize <uint64>] [-CompressibleThreshold <uint64>] [-DisableCompression <bool>] [-RequestCompression <bool>]

-DisableCompression $true or $False - never compress even if server or application requested
-RequestCompression $true or $false - always request compression even if server or application didn't specify it

-EnableCompressibilitySampling $true or $false - control legacy sampling behavior

-CompressibilitySamplingSize 1- 9,007,199,254,740,992 - size in bytes of range to sample in a file looking for compressibility

-CompressibleThreshold - 1- 9,007,199,254,740,992 - size in bytes of compressible data that must be found within that range

PowerShell for SMB Server

 Set-SmbServerConfiguration [-DisableCompression <bool>] [-RequestCompression <bool>]

-DisableCompression $true or $False - never compress even if client requested
-RequestCompression $true or $false - always request compression even if client didn't specify it.

The corresponding Registry values can be found in the official announcement.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

One thought on “You can now manage SMB compression in Windows 11 with Group Policy and PowerShell”

  1. Also besides Group Policy and PowerShell, it is supported by Gs Richcopy 360, and I love that it makes the copying process so fast and easy.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.