r/PowerShell • u/TotalGameControl • Mar 22 '26
Question Powershell keeps appearing in task manager for very short moments
Every so often i see Powershell appear in task manager for at most a second or two (i have task manager on my second monitor when there isnt anything else to have there)
I was wondering if this was normal or not? i haven't seen it before today and i'm a little worried it could be a virus or something, any assistance?
16
Upvotes
31
u/BlackV Mar 22 '26
it's not generally normal, but there are a million situation dependent reasons it could be happening
we don't have that information
things like
and so on, have a look at all your items in in startup and scheduled tasks see what in there that would be calling powershell
enable script block logging (if its not) and check the event logs to see what is actually being run
15
u/cschneegans Mar 22 '26
Windows is able to log an event when a new process is created. See my page for details. To find the responsible program, run a PowerShell command such as
Get-ProcessAuditEvents -MaxEvents 50 | Where-Object -Property 'Message' -Match -Value 'powershell' | Sort-Object -Property 'TimeCreated' | Format-Listafter you saw the offending window popping up.
7
u/strongest_nerd Mar 22 '26
You can use Process Explorer, Process Monitor, or Process Hacker to see what's going on. You can also enable process creation logging.
6
u/Liquidfoxx22 Mar 22 '26
Install sysmon, then check the event log and see what's spawning the Powershell process, and the command that it's running.
10
u/Ed_the_time_traveler Mar 22 '26
Check your scheduled tasks. Something in there might be triggering it.
1
u/jimb2 Mar 22 '26
Check it out, but there are some processes that use PowerShell to do good/non-evil things. Particularly, if you are in a managed/corporate environment where there are updates, scans, fleet reporting, etc, going on. PowerShell is a quick and dirty way to wrap a bundle of activities into a single process - eg an updater agent might do some checks, then potentially stop a process, install an update and restart it.
1
u/jkaczor Mar 23 '26
Also check your scheduled tasks in Windows Task Scheduler.
1
u/markdmac Mar 23 '26
Is your PC configuration controlled by DSC?
1
u/FranksHisName Mar 25 '26
I have a group policy that logs all powershell output regardless of source initiating it to a temp folder. Intune runs constent powershell scripts, most unsigned and bypassing. But there are countless other things that run powershell
1
u/Ok_Mathematician6075 Mar 29 '26
Hahahahhaa, you think your fucking task manager brings PowerShell up and you think you are being hacked. Well fuck