September 25th, 2012

PowerTip: Use PowerShell to Send a Web Request

Doctor Scripto
Scripter

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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.