Eggins.com
Powershell, .Net, Visual Studio, Team Foundation Server, Windows Communication Foundation

Get HTML using Powershell

The following powershell command uses the .Net library to download a HTML page from the web and displays it in the console. 

  (New-Object Net.WebClient).DownloadString("http://www.eggins.com")

You must include the protocol "http://" in the web address. This can also be used for ftp if you prefix the site with "ftp://".


Posted May 17 2007, 10:28 PM by David
Filed under:

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Copyright eggins.com, 1998 - 2008
Powered by Community Server (Non-Commercial Edition), by Telligent Systems