How to Fix PowerShell Cannot Connect to Remote Server - Resolve 504 Gateway Timeout in Scheduled Tasks-Resolve PowerShell 504 Timeout: Step-by-Step Guide

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