Skip to content

Instantly share code, notes, and snippets.

@mxschmitt
Created September 9, 2025 12:27
Show Gist options
  • Save mxschmitt/206fd772c6474c9ae1ba0c13abac2dd9 to your computer and use it in GitHub Desktop.
Save mxschmitt/206fd772c6474c9ae1ba0c13abac2dd9 to your computer and use it in GitHub Desktop.
windows-rdp-github-actions-via-tmate
- name: Download
run: Invoke-WebRequest https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip -OutFile ngrok.zip
- name: Extract
run: Expand-Archive ngrok.zip
- name: Auth
run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN
env:
NGROK_AUTH_TOKEN: ...
- name: Enable TS
run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
- run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
- run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
- name: Change password of current user
run: |
$CurrentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
$Username = $CurrentUser.Name.Split("\")[1]
Write-Host "Username is: $Username"
Set-LocalUser -Name $Username -Password (ConvertTo-SecureString -AsPlainText "@cyb3rking" -Force)
- run: |
Start-Service TermService
Set-Service -Name TermService -StartupType Automatic
- name: Create Tunnel
run: .\ngrok\ngrok.exe tcp 3389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment