Skip to content

Instantly share code, notes, and snippets.

View OrekhovAlexey's full-sized avatar

Alexey Orekhov OrekhovAlexey

View GitHub Profile
@OrekhovAlexey
OrekhovAlexey / rdp-enable.ps1
Created May 1, 2026 17:11
Enable RDP on Netcup, restricted to Tailscale interface
$ErrorActionPreference = 'Continue'
Write-Host '=== Enabling RDP, restricted to Tailscale interface ===' -ForegroundColor Cyan
# Allow incoming RDP at the policy level
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1 # NLA on
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name SecurityLayer -Value 2
# TermService running + automatic
@OrekhovAlexey
OrekhovAlexey / net-restore.ps1
Last active May 1, 2026 17:10
Persistent network + unattended Tailscale for Netcup Windows
$ErrorActionPreference = 'Continue'
Write-Host '=== Restoring Netcup network + making Tailscale unattended ===' -ForegroundColor Cyan
$ifname = 'Ethernet'
$ipv4 = '159.195.29.135'
$mask = '255.255.252.0'
$gateway = '159.195.28.1'
# 1. Static IP via netsh (persistent across reboots)
@OrekhovAlexey
OrekhovAlexey / ssh-setup.ps1
Last active May 1, 2026 16:39
OpenSSH setup for Netcup Windows + claude-headless key
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Write-Host '=== Diagnostic: privileges ===' -ForegroundColor Cyan
$elevated = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
Write-Host ('Elevated session: ' + $elevated) -ForegroundColor Yellow
if (-not $elevated) {
Write-Host 'ERROR: This PowerShell is NOT elevated. Right-click Start -> Terminal (Administrator) and rerun.' -ForegroundColor Red
exit 1
}
@OrekhovAlexey
OrekhovAlexey / vdd-install.ps1
Created May 1, 2026 16:26
VDD installer for Netcup Windows VPS
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$dst = 'C:\IddSampleDriver'
$zip = "$env:TEMP\vdd.zip"
$url = 'https://github.com/itsmikethetech/Virtual-Display-Driver/releases/latest/download/Signed-Driver.zip'
Write-Host 'Downloading VDD release ZIP...' -ForegroundColor Cyan
Invoke-WebRequest -Uri $url -OutFile $zip