Please note that our forum is a public platform, and we will modify your question to hide your personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.
Hi Jagadeesh Kumar,
I understand how frustrating it is when your PostgreSQL installer fails with a PowerShell error before it even finishes. From the error message in your screenshot, this is likely a PostgreSQL installer issue more than Windows itself. Here’s what you can try:
1 - Re‑run the installer from a simple path
- Check whether your
Tempfolder is accessible:- Press Win + R > type
%TEMP%> press Enter - If that fails, it means the installer cannot find its script
- Press Win + R > type
- Run the PostgreSQL installer again but from more simple location:
- Redownload it (e.g. to
C:\Downloads\PostgresSQLfolder) - Right‑click the installer > Run as administrator.
- Redownload it (e.g. to
2 - Temporarily allow the installer’s PowerShell script
- Press Win + X > Open Windows PowerShell / Terminal as Administrator
- Run:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass - Keep that window open > run the PostgreSQL installer again.
3 - If the installer keeps failing
- Download the ZIP version of PostgreSQL
- Extract it to a simple folder like
C:\Downloads\PostgreSQL - PostgreSQL can work normally this way, just without the setup wizard.
If the issue persists, let me know if there’s any new error appear when you attempt to open the Temp folder or trying the PowerShell script.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.