Share via

Powershell opens on startup and tries to open something. Potential Malware/Riskware/Trojan

Lakshya Ainapurapu 0 Reputation points
2026-03-12T01:57:41.33+00:00

User's image

So as you can see that malware bytes blocked it for now but after the free trial is over it wont happen anymore. This happens when i startup my laptop and it automatically opens powershell and it shows the text which I remember to be "License OK". Not sure what exactly happens but is there a fix for this?

Windows for home | Windows 11 | Security and privacy
0 comments No comments
{count} votes

Answer accepted by question author
  1. Q&A Assist
    2026-03-12T01:58:01.7133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The behavior is consistent with a malicious script that uses PowerShell for persistence and to contact a remote server. The fix is to remove the persistence points that launch PowerShell and then verify that no malicious PowerShell processes are still running.

    A practical cleanup approach (based on a similar resolved case) is:

    1. Check the Run registry key for malicious PowerShell entries
      • Open PowerShell as Administrator.
      • List startup entries under the current user:
             reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run
        
      • Look for any value whose data starts PowerShell, for example:
             powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -Command "iex(irm http://...)"
        
      • If such an entry exists, delete it (replace the value name with the one found):
             reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "Windows PowerShell v1.0" /f
        
    2. Find what is launching PowerShell
      • Still in elevated PowerShell, run:
             Get-CimInstance Win32_Process |
               Where-Object { $_.Name -like "powershell*" } |
               Select Name,ProcessId,ParentProcessId,CommandLine
        
      • If the parent process is a Task Scheduler service (for example svchost.exe -k netsvcs -s Schedule), PowerShell is being started by a scheduled task.
    3. Remove malicious scheduled tasks
      • List all tasks and their actions:
             Get-ScheduledTask |
               ForEach-Object {
                 foreach ($a in $_.Actions) {
                   "{0}{1} | {2} {3}" -f $_.TaskPath,$_.TaskName,$a.Execute,$a.Arguments
                 }
               }
        
      • Look for tasks that execute powershell.exe with suspicious arguments such as -ExecutionPolicy Bypass, -WindowStyle Hidden, or iex(irm http://...).
      • When a malicious task is identified (example name: Windows Perflog), remove it:
             Unregister-ScheduledTask -TaskName "Windows Perflog" -Confirm:$false
        
    4. Check for WMI-based persistence
      • Some malware uses WMI event subscriptions to relaunch PowerShell. Run:
             Get-WmiObject -Namespace root\subscription -Class __EventFilter
             Get-WmiObject -Namespace root\subscription -Class CommandLineEventConsumer
             Get-WmiObject -Namespace root\subscription -Class ActiveScriptEventConsumer
        
      • Review the output for entries that launch PowerShell or contain suspicious URLs or commands and remove them as appropriate.
    5. Check Startup folders
      • Inspect these folders for .ps1, .vbs, .bat, or unknown executables:
        • %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup
        • C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
      • Delete any clearly malicious script or shortcut that launches PowerShell.
    6. Final verification
      • After cleanup, reboot.
      • Open PowerShell and verify that only the current PowerShell process is running:
             Get-CimInstance Win32_Process |
               Where-Object { $_.Name -like "powershell*" } |
               Select Name,CommandLine
        
      • PowerShell should no longer open by itself at startup, and no background PowerShell processes with hidden windows or remote URLs should appear.

    If PowerShell still launches automatically or new suspicious entries reappear, a full offline scan with Microsoft Defender or a clean reinstall of Windows should be considered to ensure complete removal.


    References:

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. EmilyS_726 14,860 Reputation points Volunteer Moderator
    2026-03-12T02:18:53.51+00:00

    Hello

    Can you launch Task Manager > Startup tab, sort the status tab so all of the enabled ones are listed on top, then share a screenshot so I can review all of the "enabled" ones.

    Then hold down Win+R keys, type in :

    shell:startup

    press enter. Then share a screenshot of what's in the folder launched.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.