How to change the RDP port number from 3389 to any other which we wanted use on Windows devices via Intune?

Vinod Survase 4,746 Reputation points
2023-11-22T13:38:26.51+00:00

How to change the RDP port number from 3389 to any other which we wanted use on Windows devices via Intune?

Microsoft Intune Security
Microsoft Intune Security
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
429 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,919 questions
Microsoft Intune Enrollment
Microsoft Intune Enrollment
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Enrollment: The process of requesting, receiving, and installing a certificate.
1,372 questions
Microsoft Intune Compliance
Microsoft Intune Compliance
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Compliance: Adhering to rules, standards, policies, and laws.
168 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,180 questions
0 comments No comments
{count} votes

Accepted answer
  1. JatinMakhija 1,056 Reputation points
    2023-11-22T21:10:50.37+00:00

    To change an RDP port on a Windows device, you would need to follow below steps:

    1. Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
    2. On the right-hand side, Double-click on PortNumber and change the value from 3389 to some other custom value for example 3390 or whatever you want to set.

    Now, How to perform this using Intune?

    1. You have two options for making this registry change. Firstly, you could deploy a standalone PowerShell script that makes the necessary modifications. Alternatively, you can utilize Intune remediations, which also involve a PowerShell script. However, the Intune method requires both a Detection Script and a Remediation Script. The Detection Script checks the current value of the Portnumber registry entry, and if it's not set to the desired value, the Remediation Script is executed to make the necessary changes.
    2. Regardless of the method you choose, you can use it to update the default RDP port number on Intune-managed Windows devices.

    There are several reference guides available to assist you with PowerShell scripts and Intune Remediations if you choose to go that route. Please be aware that Intune remediations require your organization to meet specific licensing requirements. If these requirements are not met, you can opt to deploy a standalone PowerShell script using Intune to make the necessary changes.

    You can easily create one using the reference guides provided below:

    1. https://cloudinfra.net/how-to-create-a-registry-key-and-values-using-powershell/
    2. https://cloudinfra.net/powershell-to-test-if-registry-key-and-value-exists/
    3. https://cloudinfra.net/how-to-create-registry-keys-using-intune-remediations/
    4. https://cloudinfra.net/how-to-deploy-a-powershell-script-using-intune/

    --If the response is helpful, please click "Accept Answer" and upvote it.--


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.