Configure and secure SMB file shares on Windows Server with these steps.
1. Configure SMB File Shares
Step 1: Create the File Share
- Log in to the Windows Server with an account that has administrative privileges.
- Create a folder to share. Navigate to the target directory, right-click the folder, select Properties, then go to the Sharing tab.
- Click Advanced Sharing.
- Check Share this folder.
- Specify a Share Name.
- Click Permissions and configure access levels:
- Full Control: Users can read, modify, and delete files.
- Change: Users can read, modify, and delete files.
- Read: Users can only view files.
- Add specific users or groups for granular control.
Step 2: Configure NTFS Permissions
- Go to the Security tab in the folder properties.
- Set NTFS permissions to define who can access the files and what they can do.
- Assign Read, Write, Modify, or Full Control to specific users or groups.
- Ensure NTFS permissions align with share permissions for consistency.
Step 3: Configure Access-Based Enumeration (Optional)
- Access-Based Enumeration (ABE) hides files and folders from users who lack permissions.
- Open Server Manager, navigate to the File and Storage Services role, and select your shared folder.
- Enable Access-Based Enumeration under the share properties.
Step 4: Test the File Share
- From a client machine, access the share (e.g.,
\\server-name\share-name) to verify connectivity and permissions.
2. Secure SMB File Shares
Step 1: Disable SMBv1
- SMBv1 is outdated and vulnerable. Disable it:
- Open PowerShell as Administrator.
- Run:
powershell
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol
Step 2: Restrict Access
- Use Active Directory groups to manage access instead of individual user accounts.
- Apply the principle of Least Privilege: grant only the permissions each user needs.
Step 3: Enable Encryption for SMB
- SMB encryption protects data in transit.
- Enable server-wide encryption in PowerShell:
powershell
Set-SmbServerConfiguration -EncryptData $true - Or enable encryption on a specific share:
powershell
Set-SmbShare -Name "ShareName" -EncryptData $true
Step 4: Firewall Configuration
- Configure Windows Defender Firewall to allow SMB traffic (TCP 445) but restrict access to specific IP addresses or subnets where possible.
- Create inbound rules for TCP 445.
Step 5: Audit File Access
- Enable auditing to track access to shared files and folders.
- Open the folder’s Properties, go to the Security tab, and click Advanced.
- Click Auditing, add users or groups to audit, and specify the actions (read, write, etc.) to monitor.
- Review logs in Event Viewer for unauthorized access attempts.
Step 6: Regular Updates
- Keep Windows Server updated with the latest security patches to mitigate SMB vulnerabilities.
Step 7: Implement Antivirus and Endpoint Protection
- Scan the server and shared files regularly with an antivirus or endpoint protection solution.
3. Additional Recommendations
- Backup: Regularly back up shared files to protect against accidental deletion or ransomware.
- Use DFS (Distributed File System): Consider DFS namespaces for better management of file shares.
- Monitor Network Activity: Use tools like Microsoft Defender for Endpoint or Sysmon to monitor SMB traffic for suspicious activity.
- Limit Concurrent Access: If necessary, configure throttling to limit concurrent connections.

Ali YAZICI is a Senior IT Infrastructure Manager with 15+ years of enterprise experience. While a recognized expert in datacenter architecture, multi-cloud environments, storage, and advanced data protection and Commvault automation , his current focus is on next-generation datacenter technologies, including NVIDIA GPU architecture, high-performance server virtualization, and implementing AI-driven tools. He shares his practical, hands-on experience and combination of his personal field notes and “Expert-Driven AI.” he use AI tools as an assistant to structure drafts, which he then heavily edit, fact-check, and infuse with my own practical experience, original screenshots , and “in-the-trenches” insights that only a human expert can provide.
If you found this content valuable, [support this ad-free work with a coffee]. Connect with him on [LinkedIn].



