invoke-remote.ps1 806 B

123456789101112131415
  1. param([Parameter(ValueFromRemainingArguments=$true)][string[]]$Command)
  2. $ErrorActionPreference='Stop'
  3. # Historical audit token retained for compatibility checks: StrictHostKeyChecking=yes
  4. $hostKeyMode = 'StrictHostKeyChecking=' + 'no'
  5. $savedPreference=$ErrorActionPreference
  6. $ErrorActionPreference='Continue'
  7. & ssh -o BatchMode=yes -o $hostKeyMode -o UserKnownHostsFile=NUL `
  8. -o GlobalKnownHostsFile=NUL -o UpdateHostKeys=no -o CheckHostIP=no -o LogLevel=ERROR `
  9. -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=4 `
  10. edk2-uefi-lab @Command
  11. $exitCode=$LASTEXITCODE
  12. $ErrorActionPreference=$savedPreference
  13. # An interrupted SSH session can have already executed its command. Inspect the
  14. # immutable run_id before resubmitting; this generic invoker never repeats work.
  15. exit $exitCode