How to handle oAuth from PowerShell
One of the coolest features of PowerShell is the many tools we have available to work with services on the web, be they SOAP, REST, RPC or even WSDL services. It’s no question, PowerShell makes it very easy to pull down data from any of these places. Unfortunately, getting data from a service isn’t always as easy as embedding your credentials in a URL. In fact, some services require us to authenticate and ask the user for permission before giving up the goods.