How to download files with Powershell

Powershell HeaderThis should show you how you can download a file with Powershell. This is not a script or function you should use. It just is the the easyiest way to download a file with Powershell. If I have enough time I will create a function for downloading files.

$Url = ""
$Path = "C:\temp\ps.txt"
$Username = ""
$Password = ""
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile( $url, $path )