sodcalculator

10 Tech How-To

Fix Windows PowerShell Keeps Popping Up

Guide 10-48801 · Updated · Step by step

If Windows PowerShell keeps popping up on its own, the usual cause is a scheduled task, a startup entry, or a misconfigured system setting, and you can stop it by checking Task Scheduler, Startup apps, and the registry. This guide walks you through the most common fixes, from simple checks to deeper system tweaks, so you can find and disable whatever is triggering it.

Why Does PowerShell Keep Opening?

PowerShell is a command-line shell and scripting language built into Windows. It doesn’t launch by itself; something has to tell it to run. That “something” is usually one of these:

  • A scheduled task that runs at login or on a timer.
  • A startup program that calls PowerShell in the background.
  • A shortcut in the Startup folder that points to a PowerShell script.
  • A registry Run key that executes a PowerShell command.
  • A third-party tool (like a driver utility or game launcher) that uses PowerShell for updates.
  • Malware that abuses PowerShell to run malicious scripts.

In many cases, the pop-up is a brief flash that appears and disappears. That happens when a script runs and exits quickly. If it stays open, it might be waiting for input or displaying an error.

Check Task Scheduler First

Task Scheduler is the most common trigger for random PowerShell windows. To check it:

  1. Press Win + R, type taskschd.msc, and press Enter.
  2. Click Task Scheduler Library in the left pane.
  3. Look through the list for tasks that mention PowerShell, scripts, or names you don’t recognize.
  4. Double-click a suspicious task to see its triggers (when it runs) and actions (what it runs).
  5. If you find one that runs PowerShell at logon or on a schedule, right-click it and choose Disable.

Be careful: some tasks are legitimate and needed by Windows or your software. Only disable tasks you are sure are causing the pop-up. If you’re unsure, you can temporarily disable it and see if the pop-up stops.

Disable Startup Entries That Use PowerShell

Startup apps can also launch PowerShell. To see what runs at startup:

  1. Open Task Manager (Ctrl + Shift + Esc).
  2. Go to the Startup tab.
  3. Look for anything with “PowerShell” in the name or command line, or anything you don’t recognize.
  4. Right-click and choose Disable.

If you don’t see anything obvious, check the Startup folder:

  1. Press Win + R, type shell:startup, and press Enter.
  2. Look for shortcuts that point to PowerShell or .ps1 files.
  3. Delete or move them to disable.

Also check the common startup folder: shell:common startup (for all users).

Look at Registry Run Keys

Some programs add PowerShell commands to the registry so they run at every login. To check:

  1. Press Win + R, type regedit, and press Enter.
  2. Navigate to these keys (copy and paste into the address bar):
    • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
    • HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Run (for 32-bit apps on 64-bit Windows)
  3. Look for values that contain powershell or powershell.exe.
  4. If you find one, right-click it and choose Delete. (Export it first if you want a backup.)

Be very careful with the registry: deleting the wrong entry can break software. Only remove entries that clearly reference PowerShell and that you didn’t intentionally add.

Run a Malware Scan

If PowerShell pops up randomly and you can’t find a legitimate cause, it might be malware. Many malicious scripts use PowerShell because it’s built into Windows and often whitelisted by security software. Run a full scan with Windows Defender (or your preferred antivirus) and also check for potentially unwanted programs (PUPs). You can also use the built-in Windows Security > Virus & threat protection > Scan options > Full scan.

If the scan finds nothing, consider using a second-opinion scanner like Malwarebytes (free version) to catch what the primary antivirus might miss.

If You See a Specific Error or Script

Sometimes the PowerShell window shows text before closing. Write down what it says. Common messages include:

  • “Access is denied” – the script lacks permission.
  • “File not found” – a scheduled task points to a missing script.
  • “Execution policy” errors – Windows blocks the script.

If you see a path like C:\Program Files\SomeApp\script.ps1, that tells you which app is responsible. You can then disable that app’s scheduled task or startup entry.

Prevent PowerShell From Running at Startup (If You Don’t Use It)

If you never use PowerShell and want to block it from running automatically, you can disable the relevant scheduled tasks, but you cannot safely remove PowerShell itself—it’s a core Windows component. You can, however, set the execution policy to restrict scripts:

  1. Open PowerShell as Administrator (right-click Start > Windows PowerShell (Admin)).
  2. Run Set-ExecutionPolicy Restricted.
  3. Type Y to confirm.

This prevents any PowerShell script from running unless explicitly allowed, which will stop most pop-ups. Note that some legitimate apps might stop working if they rely on PowerShell scripts.

Frequently Asked Questions

Why does PowerShell flash briefly at startup and then close?

That’s usually a scheduled task or startup entry that runs a quick script. The window appears while the script executes and closes when it finishes. Use Task Scheduler and Startup apps to find and disable the trigger.

Is PowerShell popping up a sign of a virus?

Not always—many legitimate programs use PowerShell for updates or maintenance. But if the pop-up is random, frequent, or accompanied by other odd behavior, it’s worth running a full antivirus scan to rule out malware.

Can I uninstall PowerShell to stop it from popping up?

No. PowerShell is a built-in Windows component and cannot be uninstalled. You can disable scripts with the execution policy, but the shell itself will remain.

Why does PowerShell open when I log in?

This is almost always a startup entry. Check Task Manager’s Startup tab, the Startup folders, and the registry Run keys for anything that references PowerShell.

How do I know which scheduled task is causing it?

In Task Scheduler, look for tasks with triggers like “At log on” or “At startup” and actions that run powershell.exe. You can also enable the task’s history to see when it last ran, which can help correlate with the pop-up.

Will disabling all PowerShell tasks break Windows?

No, but some third-party software might stop working if it relies on those tasks. Only disable tasks you’ve identified as problematic, and re-enable them if something breaks.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →