Windows PowerShell Cookbook: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "==Cookbook== To download from the web a la *nix <code>wget</code>: <syntaxhighlight lang="powershell"> (new-object Net.WebClient).DownloadString("http://somedomain.com/somepag...")
 
Line 1: Line 1:
==Cookbook==
==Cookbook==
To download from the web a la *nix <code>wget</code>:
Download content from the web. This will print out the markup from the index page:
<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
(new-object Net.WebClient).DownloadString("http://somedomain.com/somepage.ext")
(new-object Net.WebClient).DownloadString("http://damienjay.com/")
</syntaxhighlight>
</syntaxhighlight>
[[Category:Web Development]]
[[Category:Web Development]]

Revision as of 23:28, 16 March 2012

Cookbook

Download content from the web. This will print out the markup from the index page:

(new-object Net.WebClient).DownloadString("http://damienjay.com/")