PowerShell Reset Settings Script: Step-by-Step Guide - How to Resolve PowerShell Error 0x80070002-Fix 502 Bad Gateway Error in Remote Desktop

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