Skip to content

Instantly share code, notes, and snippets.

View vtvh's full-sized avatar

Việt Hải vtvh

View GitHub Profile
@vtvh
vtvh / Setup-RDPHost.ps1
Created June 28, 2026 13:31
This script modifies the registry to allow connections, configures the firewall, and ensures the Remote Desktop Service (⁠TermService⁠) is set to Automatic so it starts every time the computer boots up.
<#
.SYNOPSIS
Configures a Windows computer as an RDP Host to automatically accept connections on boot.
.DESCRIPTION
This script enables RDP, configures the Windows Firewall, and sets the
Remote Desktop Service (TermService) to start automatically.
Must be run as Administrator.
#>
# 1. Verify Administrator privileges (Required for Registry, Firewall, and Services)