{“content”:”---\nname: windows-ssh-ps1-execution\ndescription: Execute PowerShell scripts on Windows PC via SSH when direct command strings fail due to shell path interpretation issues.\n---\n\n# Windows SSH PowerShell Execution\n\nProblem: SSH commands to Windows PC via OpenSSH (cmd /c \"cd D:\\path && command\" or powershell -Command \"cd D:\\path; command\") fail because backslashes get mangled by the shell.\n\nSolution: Write a .ps1 script locally, SCP it to the PC, then execute via powershell -ExecutionPolicy Bypass -File.\n\n## Workflow\n\n1. Write the PowerShell script to local Termux home:\n \n /data/data/com.termux/files/home/hf_render.ps1\n \n\n2. SCP to PC:\n \n scp local/file.ps1 [email protected]:C:/Users/Sozo/file.ps1\n \n\n3. Execute via SSH:\n \n ssh [email protected] \"powershell -ExecutionPolicy Bypass -File C:\\\\Users\\\\Sozo\\\\file.ps1\"\n \n\n## Why This Works\n\n- Direct SSH command strings go through bash → ssh → Windows shell → PowerShell\n- Backslashes in paths get interpreted/removed along the way\n- Writing the script file locally, then executing it entirely on Windows, bypasses all shell interpretation issues\n- Double quotes in PowerShell -Command strings also get mangled; -File avoids this entirely\n\n## Example: Render a HyperFrames composition\n\nbash\n# 1. Write render script locally\ncat > /data/data/com.termux/files/home/hf_render.ps1 << 'EOF'\ncd D:\\hyperframes_test\\test-comp\nhyperframes render -o D:\\hyperframes_test\\test-comp\\output.mp4\nEOF\n\n# 2. Copy to PC\nscp /data/data/com.termux/files/home/hf_render.ps1 [email protected]:C:/Users/Sozo/\n\n# 3. Execute\nssh [email protected] \"powershell -ExecutionPolicy Bypass -File C:\\\\Users\\\\Sozo\\\\hf_render.ps1\"\n\n\n## Tailscale IP\n\n- PC: 100.83.112.84\n- Key auth: id_ed25519_hermes\n”}