start-pgsql.ps1 221 B

1234567
  1. Function Start-PSQL([string]$command) {
  2. $location = Get-Location
  3. Set-Location "C:\Program Files\PostgreSQL\10\bin"
  4. $result = .\psql.exe --username=postgres -c "$command"
  5. Set-Location $location
  6. return $result
  7. }