Skip to content

How to Require SMB Encryption on a Windows Server Share Print

  • 0

Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.

Choose the correct encryption boundary

SMB encryption protects file traffic between an SMB client and server. It is useful when confidential documents cross a network where packet contents must remain private, including networks that are operationally separate from the application owner. Encryption is different from SMB signing: signing protects message integrity and authenticity, while encryption also protects confidentiality. Requiring one on a share does not change the NTFS ACL or authorize a new user.

A per-share requirement is an effective way to pilot the change on Finance before imposing a server-wide policy on every workload. This guide requires encryption on one existing share and validates a newly established client connection. It does not configure encryption at rest, SMB over QUIC or a VPN. Those controls address different boundaries and may be used alongside SMB encryption when the overall design calls for them.

Check clients and establish a baseline

SMB encryption requires SMB 3-capable clients and servers. Inventory Windows clients, Linux systems, scanners, backup agents and application servers that use the share. A device advertising SMB access does not necessarily support the negotiated encryption algorithms or the authentication requirements of a hardened Windows server. Test the actual device and software version before enforcing the policy.

Use an elevated Windows PowerShell session on the file server. Record the share path and current encryption setting, current server-wide policy and active workload. Check CPU headroom and transfer performance during normal activity. If a legacy dependency cannot meet the requirement, agree on a supported replacement or a separately assessed integration path rather than silently leaving a security-sensitive share unprotected.

Get-SmbShare -Name Finance | Select-Object Name,Path,EncryptData
Get-SmbServerConfiguration | Select-Object EncryptData,RejectUnencryptedAccess,EnableSMB1Protocol,EnableSMB2Protocol
Get-SmbSession | Select-Object ClientComputerName,ClientUserName,Dialect,NumOpens

Account for Windows Server release differences

Windows Server 2019 and 2022 support share encryption, but their available algorithms, SMB Direct behaviour and hardening defaults differ from newer releases. Windows Server 2022 adds improvements for encrypted SMB Direct. Windows Server 2025 introduces further SMB security controls and stronger signing defaults. A feature being available in 2025 does not mean it has the same default or parameter availability on every earlier server.

Do not infer an encrypted connection from the operating-system release alone. Inspect the actual policy, share and negotiated connection. Group Policy and security baselines may override local settings, and cumulative updates can influence behaviour. In particular, client-side encryption requirements are distinct from the server’s per-share EncryptData setting. Document which direction and endpoint you are changing. Keep signing enabled; disabling it across a server to troubleshoot a single incompatible device creates an unrelated exposure.

Require encryption on the selected share

Confirm that Finance is the intended business share and notify users of the validation window. The following command changes only that share’s encryption requirement. It does not turn on encryption for all other shares or disconnect every client deliberately. Avoid making simultaneous authentication, firewall and permission changes, because that makes a failed test much harder to interpret.

$before = Get-SmbShare -Name 'Finance' -ErrorAction Stop
$before | Select-Object Name,Path,EncryptData | Export-Clixml 'C:\AdminEvidence\Finance-encryption-before.xml'
Set-SmbShare -Name 'Finance' -EncryptData $true -Force
Get-SmbShare -Name 'Finance' | Select-Object Name,Path,EncryptData

Create and protect C:\AdminEvidence before exporting. EncryptData should now be True. Also review RejectUnencryptedAccess on the server: a policy that explicitly permits unencrypted access can undermine the intended enforcement behaviour. If it is unexpectedly disabled, investigate its owner and compatibility rationale before changing a setting that affects other shares. Do not claim success from the per-share flag without checking that incompatible access is rejected and supported access is encrypted.

Validate a fresh connection from the client

Use a supported Windows client and an authorized test account. Open a new connection to \fs01.corp.example\Finance and perform a small read and write test appropriate to that account’s rights. Inspect the SMB connection from that client after accessing the share. The client-side Get-SmbConnection object exposes the negotiated dialect and whether its connection is encrypted.

# Run on the Windows client after opening the Finance share:
Get-SmbConnection | Where-Object {
    $_.ServerName -eq 'fs01.corp.example' -and $_.ShareName -eq 'Finance'
} | Select-Object ServerName,ShareName,Dialect,Signed,Encrypted,UserName

Expect SMB 3.x and Encrypted True for the matching connection. ServerName may appear under the name actually used by the client, so inspect the full output if the filter returns nothing. A name alias, short name or reused session can otherwise make the test misleading. If existing connections are reused, arrange a controlled reconnection without closing other users’ files. Do not terminate all SMB sessions merely to obtain a cleaner screenshot.

Measure the effect on the real workload

Compare representative operations before and after the change: opening a typical document, saving it, browsing a large directory and transferring a realistically sized file. Record client and server CPU, throughput, latency and network conditions. An isolated large-file copy can miss the metadata and small-I/O behaviour of an application. Encryption cost depends on CPU capabilities, algorithms, SMB dialect and the surrounding storage or network bottleneck.

If performance falls, correlate the change with CPU utilization and storage latency rather than immediately disabling encryption. A full disk, antivirus scan or congested virtual network may coincide with the test. On virtual machines, include host-level evidence when guest observations do not explain the slowdown. Keep data classification and security requirements in the decision: a performance improvement obtained by removing required confidentiality is not an equivalent service.

Investigate failed or misleading tests

If the share flag is True but no connection appears, verify the UNC spelling, client identity and whether the application actually accesses another share. If access is denied, distinguish encryption compatibility from ordinary share or NTFS denial. Review SMB Client and SMB Server event logs around the test time and record the exact error. DNS aliases can also lead to authentication problems that encryption settings do not fix.

Some examples online select an Encrypted property from Get-SmbSession and assume an empty value is a reliable answer. Object properties and release support differ; a blank selected property can simply mean it is not present on that object. Use Get-SmbConnection on the Windows client and inspect supported properties or relevant SMB audit events. Windows Server 2025 has additional compatibility auditing controls; check command availability before trying those parameters on 2019 or 2022.

Rollback and retain evidence of protection

A rollback should return only the setting changed in this maintenance window, after the data owner accepts the security consequence. Set-SmbShare -Name Finance -EncryptData $false -Force removes the per-share requirement, but a server-wide or client policy may still require encryption. Therefore a False share flag does not prove that traffic is unencrypted, just as an unchanged client session does not prove a new setting has taken effect.

If the test reveals an incompatible appliance, preserve its details and isolate the dependency while a supported solution is planned. Do not enable SMB1, guest access or broad firewall exposure as part of encryption rollback. Record the final share setting, verification account, negotiated dialect and encryption result. Recheck after client upgrades, server migrations and baseline changes so that the security requirement remains a measured property of the service rather than an old implementation note.

Related guidance and official references

Create a secure SMB share; Troubleshoot network connectivity; Measure disk performance.


Was this answer helpful?

« Back