I agree with Michael's statement above. If you are not required to use powershell, your best bet is to use Python or any other language of choice were you can make REST calls.
Since you are using windows, try installing anaconda IDE, and use the spyder editor tool to write your code in Python. Works great, you don't need to worry about installing all the libraries and python modules you need for windows. It is a simple installer and gets you off the ground running with python on any windows or Mac host (Mac has python built in).