Commands for installing pgAdmin 4 without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id PostgreSQL.pgAdmin -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id PostgreSQL.pgAdmin -e --silentwinget uninstall --id PostgreSQL.pgAdmin -e --silentBy installer
64-bit · EXE (Inno Setup) · Current user
Silent install
pgadmin4-9.18-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
pgadmin4-9.18-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\pgadmin-4"- Uninstall registry key
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\pgAdmin 4v9_is1
64-bit · EXE (Inno Setup) · All users
Silent install
pgadmin4-9.18-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
pgadmin4-9.18-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\pgadmin-4"- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\pgAdmin 4v9_is1
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-pgadmin-4.ps1
$url = 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v9.18/windows/pgadmin4-9.18-x64.exe'
$sha256 = 'CA82B9A07007308A70A9AF55192F5CA826C9CE839FE716CEA465E2CFC4529245'
$file = Join-Path $env:TEMP 'pgadmin4-9.18-x64.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-pgadmin-4.ps1
$url = 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v9.18/windows/pgadmin4-9.18-x64.exe'
$sha256 = 'CA82B9A07007308A70A9AF55192F5CA826C9CE839FE716CEA465E2CFC4529245'
$file = Join-Path $env:TEMP 'pgadmin4-9.18-x64.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait