June 25, 2024

Enable Multiple Sessions on Windows Server 2022 via Command Line

mr rockstar

Enable Multiple Sessions on Windows Server 2022 via Command Line
Cheap Dedicated Server

To enable multiple sessions on Windows Server 2022 via command line, you can utilize PowerShell commands to install the required roles and configure the necessary settings. Here’s a streamlined guide for achieving this:

Steps to Enable Multiple Sessions on Windows Server 2022 via Command Line:

  1. Install Remote Desktop Session Host Role:

    Open PowerShell as Administrator and run the following commands:

    Install-WindowsFeature -Name RDS-RD-Server -IncludeAllSubFeature -IncludeManagementTools
    Install Remote Desktop Session Host Role
     

    This command installs the Remote Desktop Session Host role along with its management tools.

  2. Configure Remote Desktop Session Host:

    Once the role is installed, configure the Remote Desktop Session Host settings:

    Set-RDSessionHost -NewConnectionAllowed $true
    Configure Remote Desktop Session Host

    This command allows new connections to the Remote Desktop Session Host, effectively enabling multiple sessions.

  3. Optional: Modify Group Policy via Command Line (if needed):

    To disable the restriction on single sessions using PowerShell, you can set the appropriate Group Policy setting:

    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "fSingleSessionPerUser" -Value 0 -Force
    To disable the restriction on single sessions using PowerShell

    This command modifies the registry to allow multiple sessions per user.

  4. Restart Remote Desktop Services:

    After making changes, restart the Remote Desktop Services to apply the new settings:

    Restart-Service TermService -Force
    Restart Remote Desktop Services

    This command stops and then starts the Remote Desktop Services (TermService) to ensure the changes take effect immediately.

  5. Verify Configuration:

    Connect to the server using Remote Desktop from multiple client machines to verify that multiple sessions are allowed and functioning correctly.

Security Considerations:

  • Ensure that appropriate firewall rules are configured to allow Remote Desktop connections if necessary.
  • Regularly update the server with the latest security patches and updates.
  • Implement strong user access controls to restrict access to authorized users only.

Conclusion:

Enabling multiple sessions on Windows Server 2022 via command line using PowerShell commands provides a streamlined and efficient way to manage and configure Remote Desktop Services. By following these steps, administrators can ensure the server supports concurrent remote connections while maintaining security and compliance with licensing requirements.

Enable Multiple Sessions on Windows Server 2022 (F.A.Q)

What is multiple session support in Windows Server 2022?

Multiple session support allows multiple users to connect remotely to the server simultaneously, each with their own isolated session.

 

How can I enable multiple sessions via command line?

You can enable multiple sessions on Windows Server 2022 using PowerShell commands to install the Remote Desktop Session Host role, configure settings, and restart the TermService.

 

Do I need special licenses for multiple sessions?

Yes, you typically need Remote Desktop Services (RDS) Client Access Licenses (CALs) for each user or device that will access the server via Remote Desktop for concurrent sessions.

 

Can I customize session settings like session timeouts and session limits?

Yes, you can customize session settings through Group Policy or PowerShell commands to adjust parameters such as session timeouts, idle session limits, and more based on your organization’s requirements.

 

Popular Blog Posts