Added Invoke-RestMethod method for older PS versions