Check PowerShell Version Before Running Scripts - Enterprise Windows Defender Troubleshooting-Fix 502 Bad Gateway After Reboot in Command Prompt

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