Converting curl to Invoke-RestMethod is a pain. Instead of blogging about it, I decided to write a script to do the work for me. Watch me start my ConvertTo-IRM cmdlet. Whether or not it will stay named as such, we'll see.
https://github.com/theposhwolf/Curl2PS
-- Watch live at / theposhwolf