Applies to: Windows Server 2019, Windows Server 2022, and Windows Server 2025.
Access-based enumeration hides folders that a user cannot access, simplifying shared-folder navigation.
Prerequisites
- Administrative access and an approved change window.
- A verified backup and documented rollback plan.
- A pilot environment or low-risk target for validation.
Step-by-step procedure
- Verify NTFS permissions are already correct.
- Enable access-based enumeration on the selected share.
- Test with authorized and unauthorized accounts.
- Document that enumeration does not replace permissions.
Commands
Set-SmbShare -Name "Departments" -FolderEnumerationMode AccessBased
Get-SmbShare -Name "Departments" | Select Name,FolderEnumerationModeVerification
Each test user sees only folders for which enumeration rights exist.
Rollback
Set FolderEnumerationMode back to Unrestricted if the application requires the former behavior.
Security notes
- Use least privilege and record the change.
- Review relevant event logs after implementation.
- Test before production rollout.
Understand what access-based enumeration actually hides
Access-based enumeration filters directory listings so users do not see entries they lack permission to access. It does not create or repair the underlying permissions. If the NTFS or share ACL grants broad access, enabling enumeration will not make that data private.
Create a pilot structure with two departmental groups and a separate administrator account. Check that each ordinary user can see and open only the intended folders, then test the direct UNC path to another department’s folder. That direct-path test matters: hiding a folder name is not proof that opening it is denied.
Document inherited permissions and group membership before changing either setting. An administrator’s view is unsuitable for validating the ordinary-user experience because the administrator may legitimately see every entry. Use actual group-scoped test accounts rather than relying on a visual inspection from a privileged session.
If a permitted user reports a missing folder, check effective access, nested group membership and the current SMB session before disabling enumeration for everyone. Preserve the prior FolderEnumerationMode for rollback. After a permission correction, repeat both the visibility test and the actual file-access test.
Related resources
Canadian Windows VPS and RDS hosting: managed Windows VPS hosting. Refer to Microsoft Windows Server documentation.
How to Install the Windows File Server Role with PowerShell
Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.
What…
How to Create a Secure SMB Share with PowerShell
Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.
A…
How to Design NTFS Permissions with AGDLP Groups
Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.…
How to Require SMB Encryption on a Windows Server Share
Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.…
How to Configure File Server Resource Manager Quotas
Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.
Use…