dhnt kbAll pages

gotcha · candidate

Windows remote ops over outpost ssh: full exe paths, -EncodedCommand, --stdin elevation

How to run commands on a Windows host through outpost ssh without losing output or quoting — WHEN operating a remote Windows host via outpost (keywords: windows, outpost ssh, powershell, EncodedCommand, PATH, forward slashes, outpost connect --stdin, scp, lost output)

Verified 2026-11-07
2026-11-07: used repeatedly against a native Windows host during multi-satellite work; full-path PowerShell form also in outpost/docs/pairing.md · Bashy revision 536fc71bf21457eaa21ab4bb35cd574788d12f97

Facts

PS_SCRIPT='Get-Service | Select-Object -First 5 | Out-String'
ENC=$(printf %s "$PS_SCRIPT" | iconv -f UTF-8 -t UTF-16LE | base64 | tr -d '\n')
outpost ssh "$HOST_NAME" -- C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -EncodedCommand "$ENC"
bashy secret exec "$HOST_PW_SECRET=P" -- /bin/sh -c 'printf %s "$P" | outpost connect "$1" --stdin' sh "$HOST_NAME"