TechBuzzPro

Change Encryption Level for File Sharing in Windows 11

· 6 min read · Windows & PC

In this article
  1. What You’ll Need
  2. Step‑By‑Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes—you can change the encryption level for SMB file‑sharing connections in Windows 11 by configuring SMB encryption settings through PowerShell or Group Policy. This lets you require encrypted traffic, turn encryption off for trusted networks, or enforce a specific encryption algorithm supported by SMB 3.0 and later.

What You’ll Need

  • Administrator access on the PC that hosts the shared folder.
  • Windows 11 version that includes SMB 3.0 (all modern builds do).
  • PowerShell (built‑in) or the Local Group Policy Editor (gpedit.msc).
  • Another Windows device on the same network if you want to test the new settings.

Step‑By‑Step

  1. Confirm SMB version support. Open PowerShell and run Get-SmbServerConfiguration | Select-Object -Property EnableSMB1Protocol,EnableSMB2Protocol,EnableSMB3Protocol. The EnableSMB3Protocol value should be True. If it is False, enable it with Set-SmbServerConfiguration -EnableSMB3Protocol $true -Force.
  2. Decide whether you want per‑share encryption or a global policy. Per‑share encryption is useful for a single folder, while a Group Policy setting applies to all SMB traffic on the machine.
  3. Configure per‑share encryption (PowerShell method).
    1. Open an elevated PowerShell window (right‑click the Start button → Windows Terminal (Admin)).
    2. Identify the share name you want to modify, e.g., \MyPC\Documents corresponds to the share Documents. Use Get-SmbShare to list existing shares.
    3. Run Set-SmbShare -Name "Documents" -EncryptData $true to require encryption for that share. Replace $true with $false if you want to disable encryption.
    4. Verify the change with Get-SmbShare -Name "Documents" | Select-Object Name, EncryptData. The EncryptData column should now show True or False as you set it.
  4. Configure a global encryption requirement (Group Policy method).
    1. Press Win+R, type gpedit.msc, and press Enter to open the Local Group Policy Editor.
    2. Navigate to Computer Configuration → Administrative Templates → Network → Lanman Workstation. (Menu labels may differ slightly by Windows build.)
    3. Locate the policy Enable insecure guest logons – leave it Disabled if you want only authenticated, encrypted connections.
    4. Now go to Computer Configuration → Administrative Templates → Network → Lanman Server and open Require SMB encryption. Set the policy to Enabled and choose Require encryption for all SMB connections from the dropdown.
    5. Click Apply and OK. Close the editor and run gpupdate /force in an elevated Command Prompt to apply the policy immediately.
  5. Adjust the encryption algorithm (optional, PowerShell). Windows 11 supports AES‑128‑CCM, AES‑128‑GCM, AES‑256‑CCM, and AES‑256‑GCM. To prefer a stronger algorithm, run:
    Set-SmbServerConfiguration -EncryptData $true -EncryptionAlgorithm "AES256_GCM" -Force
    This command forces the server to use AES‑256‑GCM when both client and server support it.
  6. Test the new settings. From another Windows 11 PC, map the shared folder using \MyPC/Documents. Open PowerShell on the client and run Get-SmbConnection. The EncryptionEnabled column should read True for the connection you just configured.
  7. Document the change. Record the share name, the encryption state, and the date of modification in your IT change log. This helps with future audits and troubleshooting.

Common Mistakes

  • Forgetting to run PowerShell as administrator. Without elevated rights the Set‑SmbShare and Set‑SmbServerConfiguration cmdlets will fail silently or return an access‑denied error.
  • Changing the wrong policy path. The encryption policy lives under Lanman Server, not Lanman Workstation. Editing the workstation side only affects client‑side behavior.
  • Disabling SMB 3.0. Some older scripts toggle EnableSMB2Protocol or EnableSMB1Protocol. Turning off SMB 3.0 removes the encryption capability entirely.
  • Assuming GUI options exist. Windows 11’s Settings app does not expose SMB encryption controls; attempting to find them there will waste time.
  • Neglecting to test from a non‑admin client. Encryption works for all users, but a client logged in as a local administrator might bypass certain restrictions, giving a false sense of success.

Tips

  • Use Get‑SmbServerConfiguration to view the current global encryption state before making changes.
  • If you manage many computers, deploy the Group Policy setting via Active Directory rather than configuring each machine manually.
  • Combine encryption with NTFS permissions to enforce least‑privilege access; encryption protects data in transit, permissions protect data at rest.
  • When you need to support older devices that only understand SMB 1.0, consider creating a separate, non‑encrypted share on a dedicated machine rather than disabling encryption globally.
  • Keep Windows Update enabled; Microsoft occasionally adds new default encryption algorithms that improve performance without user intervention.

Troubleshooting

If the connection still shows EncryptionEnabled = False after you have applied the settings, follow these steps in order:

  1. Restart the SMB services. Open an elevated Command Prompt and run:
    net stop lanmanserver && net start lanmanserver
  2. Verify that both computers support SMB 3.0. Run Get‑SmbConnection on each machine; the Dialect column should read 3.x. If it shows 2.0 or lower, the client or server is falling back because of a compatibility setting.
  3. Check firewall rules. Windows Defender Firewall may block SMB traffic on public networks. Open Windows Defender Firewall with Advanced Security, ensure that File and Printer Sharing (SMB‑In) is allowed on the profile you are using.
  4. Confirm the Group Policy applied. Run gpresult /h gpresult.html and open the generated HTML file. Look for the Require SMB encryption setting under Computer Configuration → Administrative Templates → Network → Lanman Server. If it shows Not Configured, rerun gpupdate /force or check for conflicting policies.
  5. Review the share’s encryption flag. Even if the global policy is enabled, a share can be explicitly set to EncryptData $false. Run Get‑SmbShare -Name "YourShare" | Select‑Object Name, EncryptData to ensure the flag matches your intent.
  6. Look for third‑party security software. Some endpoint protection suites intercept SMB traffic and may disable encryption for performance reasons. Temporarily disable the software or add an exception for SMB.
  7. Reboot the machines. Some settings only take full effect after a restart, especially after changing the SMB protocol version.

If none of the above resolves the issue, consider resetting the SMB configuration to defaults with Set‑SmbServerConfiguration -EnableSMB2Protocol $true -EnableSMB3Protocol $true -Force and then re‑apply the desired encryption settings.

Frequently Asked Questions

Do I need both client and server to run Windows 11 to use SMB encryption?

No. Any Windows version that supports SMB 3.0 (Windows 8/Server 2012 and later) can negotiate encryption. Both ends must have SMB 3.0 enabled, but they do not need to be the same Windows edition.

Can I choose between AES‑128 and AES‑256 encryption?

Yes, using the -EncryptionAlgorithm parameter in Set‑SmbServerConfiguration. The options are AES128_CCM, AES128_GCM, AES256_CCM, and AES256_GCM. The strongest algorithm (AES‑256‑GCM) is used automatically if both devices support it.

Will enabling encryption affect file‑transfer speed?

Encryption adds a small CPU overhead, but on modern hardware the impact is typically negligible. On older machines you may notice a modest slowdown, especially with large files.

Is there a way to encrypt only specific files within a share?

SMB encryption works at the connection level, not per‑file. To encrypt individual files at rest, use Windows’ built‑in Encrypting File System (EFS) or BitLocker on the volume.

What happens if a client that does not support SMB 3.0 tries to connect?

The connection will fall back to the highest common SMB version. If the server requires encryption (via the global policy), the fallback client will be denied access because it cannot meet the encryption requirement.

Can I enforce encryption for guest (anonymous) shares?

Guest access is considered insecure. The Enable insecure guest logons policy should remain disabled, and you should require authentication for any share that needs encryption.