Why Do Brief PowerShell or Command Prompt Windows Keep Appearing in Windows 11?
Asked by
MellowCedar42
Every so often, a PowerShell- or Command Prompt-style window flashes on screen for less than a second. It contains several lines of organized text and can appear multiple times within an hour, whether I'm browsing the internet or watching a video. It doesn't seem to happen while I'm playing games. I can't read the text before the window disappears. Could this be Windows performing updates, an automatic installer, a scheduled task, or something potentially suspicious?
Answers
Microsoftโs Autoruns utility can help identify what starts automatically. Run it as administrator, open the Scheduled Tasks section, and look for unfamiliar entries or tasks that launch PowerShell, Command Prompt, or a script. You can inspect suspicious files and use the built-in VirusTotal checking option before disabling anything. Donโt delete entries until you know what they do.
Reply to this answer
That isnโt typical behavior if it happens repeatedly, so itโs worth investigating rather than assuming itโs just Windows. Think about anything installed or updated recently, including drivers, utilities, antivirus software, and app launchers. A scheduled task or updater may be launching a script in a visible console window.
Reply to this answer
If the window is from PowerShell, its command history may show recent commands. Try running `Get-Content (Get-PSReadLineOption).HistorySavePath` in PowerShell. However, this may not reveal commands launched by another account, a scheduled task, or a process that doesnโt use interactive history, so checking Task Scheduler and startup programs is still important.
Reply to this answer
Add your answer
Answers are reviewed before publication.
QuietLantern5: The most useful clue would be the parent process that launches the console window. Process Monitor or Event Viewer may help identify which executable or scheduled task is responsible, especially if the PowerShell history is empty.