Follow the below steps to install the latest version of PostgreSQL on Windows by scoop package manager.
scoop install postgresql -g
cd C:\ProgramData\scoop\apps\postgresql\current\bin
pg_ctl.exe register -N PostgreSQL -D "C:\ProgramData\scoop\apps\postgresql\current\data" -S auto
You can use command line to start/stop PostgreSQL service or alternatively use the Services
menu in the Task Manager
.
sc start PostgreSQL
sc stop PostgreSQL
Note: tested with PostgreSQL v15.4 on Windows 10.