$ErrorActionPreference = 'Stop' $vps = '201.79.107.99' $dir = 'C:\flotilla' $exe = Join-Path $dir 'vessel.exe' $want = 'a12053c7b51720ad9d5163f41e5c1e58e34f49d96f0399e779124bee21556809' New-Item -ItemType Directory -Force -Path $dir | Out-Null Write-Host "==> Downloading http://$vps`:8080/vessel-stand-win.exe" Invoke-WebRequest -Uri "http://$vps`:8080/vessel-stand-win.exe" -OutFile $exe -UseBasicParsing $hash = (Get-FileHash $exe -Algorithm SHA256).Hash.ToLower() if ($hash -ne $want) { throw "sha256 mismatch: got $hash, want $want" } Write-Host "==> SHA256 ok: $hash" Start-Process -FilePath $exe -WorkingDirectory $dir Write-Host "==> vessel started: $exe (agent stand-win, nats://$vps`:4222)" Write-Host "==> seed file: $dir\vessel.seed"