Why Does PowerShell Open Automatically When I Start Windows?

August 3, 2026 4 answers
Asked by MellowCedar47
Whenever I turn on my Windows PC, a PowerShell or Terminal window opens by itself and only shows a prompt like `PS C:Users(my username)>`. I ran full and offline scans with Malwarebytes and Windows Defender, but neither found anything. Could this be malware, or is there a normal startup setting causing it? Disabling Terminal in the Startup Apps section of Task Manager stopped the window from appearing.

Answers

PixelHarbor8
Check the Startup Apps section in Task Manager first. Windows Terminal can be configured to launch when you sign in, so disabling its startup entry may solve it without there being any malware involved.
Reply to this answer
QuartzMango31
If you want to find out exactly what PowerShell is running, enable a transcript in your PowerShell profile. You can check whether the profile exists with `Test-Path $PROFILE`, create it with `New-Item -Path $PROFILE -Type File -Force`, and add `Start-Transcript` to the file. The next time PowerShell opens, its commands will be recorded in your Documents folder for inspection.

BrightOtter5: You can also create the profile and add the transcript command in one step with `New-Item -Path $PROFILE -Type File -Force -Value 'Start-Transcript'`.

Reply to this answer
NimbleFox_62
If it isnโ€™t listed clearly in Startup Apps, check Task Scheduler and use Microsoft Sysinternals Autoruns. Those tools can show programs, scheduled tasks, services, and other entries that launch when you log in.
Reply to this answer
CopperSparrow19
A PowerShell window opening at login doesnโ€™t automatically mean an infection. Startup settings, scheduled tasks, Windows Terminal preferences, or a PowerShell profile can all cause it. Since turning off Terminal in Task Manager fixed the issue, that startup entry is the most likely explanation, though checking the logs or profile can provide extra confirmation.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions