Today I’m going to cover a really practical topic that’s crucial for Windows environments – how to use GPO (Group Policy Object) to limit the number of concurrent connections to network shared folders.
Many IT administrators have probably received inquiries like “Why can’t I suddenly access the shared folder?” Especially when operating file servers or shared folders, performance degradation or connection denial often occurs when there are too many simultaneous users.
1. Why Network Share Connection Limits Are Necessary
When operating network shared folders, several issues can arise when many users access them simultaneously. Windows 10 and 11 only allow 20 simultaneous connections by default, which is also specified in the EULA (End-User License Agreement).
In environments I’ve managed, I frequently encounter the error message: “No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept“.
Common Scenarios
- When many users simultaneously access file servers
- When a single user uses multiple sessions concurrently
- When network connections accumulate without proper disconnection
- When applications attempt multiple connections to file shares
2. Understanding Windows SMB Connection Limits
Windows client operating systems limit SMB (Server Message Block) protocol network share connections to 20. This is based on TCP connection count, not user count, so a single user can create multiple connections.
Connection Count Calculation
Connections are actually counted by sessions, not users, and one user can have multiple sessions. For example:
- Accessing shared folder via Explorer: 1 session
- Accessing same folder through another Explorer window: Additional session
- Opening files from applications: Additional session
3. Setting Connection Limits via GPO
Now let’s explore how to limit network share connections using GPO.
3-1. Accessing Group Policy Management Console
- Run
gpmc.msc
from Start Menu or search for Group Policy Management - Create new GPO in the domain or relevant OU (Organizational Unit)
- Navigate to the following path in GPO Editor:
Computer Configuration
└── Policies
└── Administrative Templates
└── Network
└── Lanman Server
3-2. Key Policy Settings
Maximum number of concurrent sessions
- Policy Location:
Computer Configuration\Administrative Templates\Network\Lanman Server
- Default Value: Unlimited
- Recommended Setting: 10-50 connections (adjust based on environment)
Configuration Steps:
- Set policy to “Enabled”
- Enter desired connection count in “Maximum number of sessions” field
- Generally recommend setting to 10-30 connections
3-3. Additional Related Policies
Restrict concurrent TCP connections
Computer Configuration\Administrative Templates\Network\Network Connections
└── Minimize the number of simultaneous connections to the Internet or a Windows Domain
This policy allows computers to limit multiple connections to the Internet or Windows domains.

4. Practical Implementation and Monitoring
4-1. Checking Current Connection Status
It’s important to verify how many connections are currently active.
Using PowerShell
# Check SMB sessions
Get-SmbSession
# Check detailed information
Get-SmbSession | Select-Object ClientComputerName, ClientUserName, SessionId, SecondsIdle
Using Computer Management
- Launch Computer Management
- Navigate to System Tools → Shared Folders → Sessions
4-2. Automatic Connection Cleanup Script
You can use PowerShell scripts to automatically clean up old connections:
# Automatically disconnect 2 oldest sessions when 19 connections reached
$sessions = Get-SmbSession
if ($sessions.Count -ge 19) {
$oldestSessions = $sessions | Sort-Object SecondsIdle -Descending | Select-Object -First 2
$oldestSessions | Remove-SmbSession -Force
}
5. Performance Optimization and Troubleshooting
5-1. SMB Performance Tuning
To improve SMB file server performance, you can adjust the following registry settings:
MaxThreadsPerQueue Setting
Path: HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Key: MaxThreadsPerQueue
Default: 20
Recommended: 30-50 (for high-load environments)
Smb2CreditsMin/Max Settings
Windows Server defaults are 512 and 8192 respectively, and these values can be increased for better performance in high-bandwidth, high-latency environments.
5-2. Common Troubleshooting
Issue | Cause | Solution |
---|---|---|
Connection denied errors | 20 connection limit exceeded | Set GPO limits or clean sessions |
Slow file transfers | Too many concurrent connections | Limit connections and bandwidth |
Intermittent disconnections | Session timeouts | Adjust SMB settings |
6. Advanced Settings and Best Practices
6-1. Environment-Specific Recommendations
Small Office (10-20 users)
- Maximum concurrent connections: 15
- Session timeout: 30 minutes
- Monitoring frequency: Weekly
Medium Organization (50-100 users)
- Maximum concurrent connections: 30
- Session timeout: 15 minutes
- Monitoring frequency: Daily
Large Organization (100+ users)
- Windows Server recommended
- Dedicated file server implementation
- Consider load balancing
6-2. Security Considerations
Properly configure firewall rules for SMB traffic to prevent lateral movement attacks:
Block Inbound SMB (for non-file servers)
Rule Name: Block Inbound SMB
Protocol: TCP
Port: 445
Action: Block
Target: All clients that are not file servers
Network share connection limiting seems simple but requires considering various factors in real environments. Through systematic GPO management and continuous monitoring, you can build a stable file sharing environment.
Especially for environments with growing user bases or heavy file sharing usage, I strongly recommend considering dedicated Windows Server-based file servers. 🙂