Enable Windows Defender Command Line Tools: A Practical Guide - Windows Defender 502 Bad Gateway Troubleshooting-Fix Windows Search Service High Memory Usage with Permission Denied Errors

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.