Share via

Windows 11 Windows Defender scheduled scan returns 0x2 error

Anonymous
2022-04-28T14:02:32+00:00

When the Windows Defender scheduled scan runs from Task Scheduler it does not complete and returns error code 0x2. This happens even if I run it manually from scheduler. This happens on all three of my Windows 11 machines and so is not machine specific. I am currently up to date on all three machines. Windows Defender will run to completion if I run it from Windows Security under Virus and Threat Protection. I know this has been a lingering issue, dating back to at least Windows 10.

Is there a known solution?

Thank you.

Windows for home | Windows 10 | Security and privacy

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

9 answers

Sort by: Most helpful
  1. Anonymous
    2022-07-25T23:37:52+00:00

    Thank you for taking the time to answer my question. I really appreciate it. I just got tired of dealing with it and moved on to a more reliable product (Acronis Cyber Protect Home Office Advanced or ACPHOA). Seems like if MS really wanted their AV software to have widespread use they would fix this problem.

    Have a good week!

    5 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-04-29T07:29:33+00:00

    It's been like that since at least Win 8.1. There's no need to worry over it because Defender runs all the time as the real-time scanner. Also, it does a quick scan of files independently of the Task Scheduler as frequently as it needs. Every so often, you will get a message in Action Center that it has run.

    In the days I did worry (way back then), I did discover the built-in scheduled scan will only run to completion after a reboot if it starts (& finishes) before the computer goes to sleep. After sleep, it will start, but you'll always get that (0x2)...

    Image

    And, IIRC, it must be a reboot, which does a full shutdown. It can't just be a boot, which was preceded by a hybrid shutdown. But don't worry, all is well.

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-07-23T17:59:41+00:00

    I ran into this one, so I tried the command from the actions tab in Task Scheduler in a terminal window and it fails. I can't find any documentation on the arguments/options that are in this command. I set up my own scan tasks using "-Scan Scantype 2" as the arguments and it runs just fine, so I suspect the arguments are the issue. I have no idea what Microsoft is trying to do with this task as I can find no documentation for the arguments "Scan -ScheduleJob -ScanTrigger 55 -IdleScheduledJob" that is in the Microsoft job. As long as you are an admin, you can create your own tasks to periodically run scans by using the simple arguments shown above.

    As others have stated, if you reboot it will run a scan once and thereafter you get the "0x2" error and no more scans. I'm pretty sure this was working before a recent windows update, so I think something is broken.

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2022-04-29T11:22:08+00:00

    Thanks for taking time out of your busy day to help me. I really appreciate. Just one question, what is IIRC?

    0 comments No comments
  5. Anonymous
    2022-04-29T06:25:20+00:00

    Hi Rick_766,

    Thanks for your post in the Microsoft Community.

    I understand that you are encountering a failure to create a regular scan of Windows defender using Task Scheduler.

    This problem did exist before, I checked some forum threads and some users can fix this problem by updating Windows. If you are using the latest version of Windows 11, this workaround is temporarily unavailable.

    I tried creating a scan task on my computer based on this article, and my Windows performed the task as expected. So I think this may be a possible bug in the system, since this problem exists in all three of your computers and has a long history.

    If Windows doesn't fix the problem with an update, I think I can try an overwrite install of Windows to see if that fixes the problem.

    You can click here to download the Windows installation tool and download the ISO file for mirror installation.

    This process will not affect your data and programs. This is not a reinstall and reset of the system, but a repair process. It won't waste a lot of your time.

    If the problem persists after overwriting the installation, then I suggest you press Win+F to report the problem. Let the developers see if it's a possible problem with the system itself.

    Thank you for your understanding and stay safe!

    Kirk | Microsoft Community Support Specialist


    * Beware of scammers posting fake support numbers here.

    * If your problem is not solved, you can repost and we will continue to provide you with technical support.

    * Please check and vote this answer if it helps, as it will benefit more community members who read here.

    0 comments No comments