Optimizing PowerShell Scripts to Reduce High Memory Usage - Mac Terminal vs Command Prompt-How to Fix PowerShell Connection Refused Error

Result check
- Keep one change per test run so you know which step helped.
- Undo temporary changes after the issue is confirmed.