# How to change RDP port on Windows

เนื่องจากเหตุผลในด้านความปลอดภัย จึงจำเป็นต้องเปลี่ยน service port ที่เป็น default ให้เป็น port อื่น เช่น 3389 เปลี่ยนเป็น 23389 เป็นต้น

**1. ทำการ Snapshot Instance > Take Snapshot > Confirm**

&#x20;![](https://t9003005656.p.clickup-attachments.com/t9003005656/2060f1b6-dbb0-488e-a975-6ec68095edda/Untitled-1.png)

![](https://t9003005656.p.clickup-attachments.com/t9003005656/333c6d27-f313-40b8-899a-0ca78f396ec9/Untitled-2.png)

**2. ทำการเปิด Run แล้วพิมพ์คำสั่ง regedit ตามด้วยกด OK** &#x20;

![](https://t9003005656.p.clickup-attachments.com/t9003005656/d424033e-1b0a-4f43-8bde-86e973418561/image.png)

**3. จากนั้นที่หน้า Registry Editor ให้เปิดไปที่ \HKEY\_LOCAL\_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp**

![](https://t9003005656.p.clickup-attachments.com/t9003005656/eee5b3d9-0fd8-4f96-8d4c-c81a1733bf97/image.png)&#x20;

**4.  ที่ช่องทางด้านขวาให้คลิกขวาที่ PortNumber แล้วเลือก Modify**&#x20;

![](https://t9003005656.p.clickup-attachments.com/t9003005656/29ee087a-39ee-42b0-8979-01863932a616/image.png)

**5. ให้เลือก decimal แล้วทำการกำหนด Port ตามที่ต้องการ โดยต้องมี 4 หน่วยขึ้นไปและต้องไม่ซ้ำกับ Port อื่นๆ เสร็จแล้วคลิก OK ในรูปภาพยกตัวอย่าง port 43389**&#x20;

&#x20;![](https://t9003005656.p.clickup-attachments.com/t9003005656/abcd0f32-347b-4475-9a07-f956a62486e5/image.png) &#x20;

**6. ปิดหน้าต่างทั้งหมดแล้วทำการ Restart เครื่อง**&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-epc.gitbook.io/ncs-documents/compute/compute-instance/how-to-change-rdp-port-on-windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
