Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / Maximum Concurrent Connections Limit in Windows 10 and 11

February 24, 2025

Maximum Concurrent Connections Limit in Windows 10 and 11

The number of simultaneous network connections from other computers is limited in the desktop editions of Windows. For example, only 20 simultaneous incoming sessions (connections) are supported on Windows 10 and 11 (regardless of edition). When a computer running Windows 10/11 is used as a quasi-file server or print server, users receive an error when connecting if the TCP/IP session limit is exceeded:

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.

Windows error: No more connections can be made to this remote computer at this time

The Windows 11 End-User License Agreement (EULA) states that you cannot connect more than 20 devices to a desktop device simultaneously.

Device connections. Up to 20 other devices can remotely access the software installed on the licensed device solely to use the following software features for personal or internal purposes: file services, print services, Internet information services, and Internet connection sharing and telephony services on the licensed device. You may allow any number of devices to access the software on the licensed device to synchronize data between devices. This subsection does not mean, however, that you have the right to install the software or use the primary function of the software (other than the features listed in this subsection), on any of these other devices.

Microsoft restricts the non-server (desktop) edition of Windows from functioning as a full server, likely to encourage users to buy Windows Server licenses (or switch to samba😊).

Check the number of incoming sessions limit in Windows by using the command:

net config server

net config server maximum logged on users on Windows 10/11

Current limit:

Maximum Logged On Users 20
For example, Windows Server has a much higher connection limit 16777216. Windows server SMB connection limit 16777216

Note the value of the Idle session time (min) parameter. By default, Windows disconnects a session that has been inactive for more than 15 minutes. If you want to disconnect unused sessions more quickly, reduce the timeout period (for example to five minutes).

net config server /autodisconnect:5

You can manually disconnect some devices if the number of simultaneous connections to the computer is exceeded. List the active network connections on this computer:

net session

Disconnect all active sessions from a computer (by hostname or IP address):

net session \\192.168.31.94 /d

net session - list and disconnect active sessions

To reset all active connections to a computer

net session /delete

If you want to automatically disconnect certain clients when the maximum number of connections is reached, you can use PowerShell automation. Below is an example of a simple PowerShell script that gets a list of active sessions and when it reaches 19 concurrent connections, it disconnects the 2 sessions with the longest timeouts (or use other logic).

$number_of_old_sessions_to_kill=2
$output = net session | Select-String -Pattern \\
$CurConns= ($output| Measure-Object -Line).Lines
if ($CurConns -ge 19) {
$sessions = @()
$output | foreach {
$parts = $_ -split "\s+", 4
$session= New-Object -Type PSObject -Property @{
Computer = $parts[0].ToString();
Username = $parts[1];
Opens = $parts[2];
IdleTime = $parts[3];
}
$sessions += $session
}
$oldsessions=$sessions|Sort-Object -Property IdleTime -Descending | Select-Object -First $number_of_old_sessions_to_kill
ForEach ($oldsession in $oldsessions) {
net session $($oldsession.Computer) /d /y
}
}

Use Task Scheduler to run this PowerShell script every N minutes to disconnect the idle sessions.

powershell disconnect inactive smb connections

For earlier versions of Windows, patches to the tcpip.sys file can disable the session limit in desktop OS editions, similar to the RDP Wrapper library. But I haven’t seen any such patches for Windows 10 and 11 yet. In any case, their use is a violation of the license agreement.

0 comment
1
Facebook Twitter Google + Pinterest
PowerShellWindows 10Windows 11
previous post
Windows: How to Turn Off Monitor with Command Line
next post
How to Hide (Block) a Specific Windows Update

Related Reading

Create a Custom Windows Image with Pre-installed Apps

February 28, 2024

Upgrading to Windows 11 on Unsupported Hardware

March 6, 2024

How to Assign (Passthrough) a Physical GPU to...

June 11, 2024

Configuring RemoteApps Hosted on Windows 10/11 (without Windows...

January 25, 2025

Disable BitLocker Automatic Drive Encryption in Windows 11

October 16, 2024

Enable Hyper-V on Windows 10/11 Pro and Home...

August 12, 2024

Fix: Your IT Administrator Has Limited Access to...

March 22, 2024

Get Started with Docker on Windows (WSL2) without...

September 4, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Assign (Passthrough) a Physical GPU to a Hyper-V Virtual Machine
  • Run PowerShell Scripts on a Schedule with Task Scheduler
  • Extend an Expired User Password in Active Directory
  • Check Windows 11 Hardware Readiness with PowerShell Script
  • How to Find Windows Version and Build Number Installed
  • Check the Software Installation/Removal History in Windows
  • How to Add or Remove Pinned Folders to Quick Access with PowerShell and GPO
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top