Use one of these Windows options:
- Set sleep to a longer time or temporarily disable it
- Open Start > Settings > System > Power & sleep > Additional power settings.
- Select the current power plan settings and increase the sleep timeout, or set sleep so the PC does not sleep during the scan.
- If using a laptop, check lid and power button behavior
- In Additional power settings, select Choose what closing the lid does.
- Set When I close the lid to Sleep only if that is desired, or avoid closing the lid during the scan.
- Select Choose what the power buttons does and confirm the power button is not set to put the PC to sleep accidentally.
- Use PowerToys Awake for a temporary keep-awake option
- PowerToys Awake keeps the computer awake without changing Windows power and sleep settings.
- It is useful for long-running tasks so work continues uninterrupted.
- It works only while signed in and enabled, and it does not work when the lock screen is displayed.
For Microsoft Defender specifically, power state can interrupt scans. If the device enters sleep or changes power state, the scan might not finish in a timely manner. If the device is running on battery during a scheduled full scan, the scan stops and runs again at the next scheduled time.