Skip to content

1. 修改rdp

To change the listening port using PowerShell, follow these steps:

1.Open PowerShell as an administrator.

2.Check the current port by running the following PowerShell command:

bash
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"

3.Change the port by running the following PowerShell command, replacing <port number> with the new port number:

bash
$portvalue = 62189

Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value $portvalue
$portvalue = 62189

Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value $portvalue

4.Create new firewall rules to allow the new port using the following PowerShell command, replacing <port number> with the new port number:

bash
New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 62189
New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol UDP -LocalPort 62189
New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 62189
New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Profile 'Public' -Direction Inbound -Action Allow -Protocol UDP -LocalPort 62189

5.reboot

官当

https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ec2-instance-recover.html

1.2 添加远程普通用户

1.添加账户

点击设置-->帐户--->其他用户-->添加

image-20250330135118080

image-20250330135301656

image-20250330135342356

image-20250330135423513

2.把普通用户添加到远程组

image-20250330135501931

image-20250330135531053

image-20250330135610417