PowerTip: Use PowerShell to Send a Web Request

Summary: Use the Invoke-WebRequest Windows PowerShell cmdlet to easily send a web request.


Hey, Scripting Guy! Question How can you easily send an HTTP or HTTPS request to a web service by using Windows PowerShell 3.0?

Hey, Scripting Guy! Answer Use the Invoke-WebRequest cmdlet. For example, the following code returns links from the Hey, Scripting Guy! Blog.

(Invoke-WebRequest scriptingguys.com/blog).links

Comments (1)

  1. Anonymous says:

    Invoke-WebRequest is AWESOME!