Hello,
Here are a few steps you can try to troubleshoot the issue:
Check Network Stability: Ensure your internet connection is stable. Unstable connections can cause frequent disconnections.
Update PowerShell: Make sure you are using the latest version of PowerShell. Sometimes, updates can fix connectivity issues.
Firewall and Antivirus Settings: Check if your firewall or antivirus software is blocking the connection.
Temporarily disable the firewall and see if that works.
Logs and Error Messages: Check the logs and error messages for more details on why the connection is dropping. This can provide clues on what might be going wrong.
Best Regards,
Hania Lian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.