Pages

Thursday, 20 June 2013

Using the powershell to download a file

A simple script to download a file:

$url="http://hostname/xxxxFiletoDownload"

$thisir =pwd

$path = $thisdir.toString() "\xxxxFiletoDownload"


$client = new-object System.Net.WebClient

$client.DownloadFile( $url, $path )