Windows Powershell V3 includes command like wget/curl

The Windows Management Framework 3.0 – Community Technology Preview (CTP) has been released by Microsoft and with it comes Powershell V3.

Included on this release of powershell comes a command I’ve personally been missing for ages. A command to get or just test a given URL address. The is called:
Invoke-WebRequest

A simple example of the command usage would be the get this blog’s home page into a single text file:

Invoke-WebRequest http://rambletech.wordpress.com/ -OutFile c:\temp\blog.txt

Another example, more complex, would be to get this blogs RSS feed and parse it:

([xml](Invoke-WebRequest http://rambletech.wordpress.com/rss).content).rss.channel.item | Select Title, Link

To download the Windows Management Framework 3.0 CTP 1 visit this address from Microsoft.

Happy programming :)

About these ads

3 thoughts on “Windows Powershell V3 includes command like wget/curl

  1. Pingback: Posting SOAP request from Windows Powershell | Rambles on Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s