Please see this story:
https://community.atlassian.com/t5/Git-questions/HOWTO-Use-PowerShell-Invoke-RestMethod-to-down-load-all-files/qaq-p/1130327#M30344