PowerShell is great -- but there are some things you simply cannot do with it. For example, try to escape '$', which can be included in urls but can't be used in Invoke-RestMethod.
Bash via WSL saves the day, in this regard (e.g.: $results = wsl ./myAwesomeBashScript.sh).
While PowerShell is great as object-oriented scripting, it still can't handle simple tasks that can be done in the likes of bash, zsh, etc.