# boot.mutiev.kz/win.ps1 - fresh Windows PC -> managed from midi (Claude) over SSH. # Run in PowerShell as Administrator: irm https://boot.mutiev.kz/win.ps1 | iex # Source: git mutiev/boot-mutiev-kz (#527). Public on purpose: contains only a PUBLIC key, no secrets. $ErrorActionPreference = 'Continue' $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if (-not $isAdmin) { Write-Host "Run PowerShell as Administrator (Win+X -> Terminal (Admin))" -ForegroundColor Red; return } Write-Host "1/5 Network profile -> Private" Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private Write-Host "2/5 OpenSSH Server (takes a couple of minutes)" Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | Out-Null Start-Service sshd Set-Service sshd -StartupType Automatic if (-not (Get-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -ErrorAction SilentlyContinue)) { New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow | Out-Null } New-ItemProperty -Path 'HKLM:\SOFTWARE\OpenSSH' -Name DefaultShell -Value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -PropertyType String -Force | Out-Null Write-Host "3/5 Authorized key midi-wsl (public)" $k = 'C:\ProgramData\ssh\administrators_authorized_keys' $pub = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL/1z/nyccAJytVUJIB9RRE4lkNQSTaaJbttL2WX/IHY midi-wsl' if (-not ((Test-Path $k) -and (Select-String -Path $k -SimpleMatch $pub -Quiet))) { Add-Content -Path $k -Value $pub -Encoding ascii } icacls $k /inheritance:r /grant '*S-1-5-32-544:F' /grant '*S-1-5-18:F' | Out-Null Write-Host "4/5 No sleep on AC, allow ping" powercfg /change standby-timeout-ac 0 if (-not (Get-NetFirewallRule -Name 'ICMPv4-In-Claude' -ErrorAction SilentlyContinue)) { New-NetFirewallRule -Name 'ICMPv4-In-Claude' -DisplayName 'ICMPv4 echo in' -Protocol ICMPv4 -IcmpType 8 -Action Allow | Out-Null } Write-Host "5/5 Done. Send this to Claude:" -ForegroundColor Green "user: $(whoami)"; "host: $(hostname)" Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.IPAddress -notlike '127.*' -and $_.IPAddress -notlike '169.254.*' } | ForEach-Object { "ip: $($_.IPAddress)" } "sshd: $((Get-Service sshd).Status)"