In PowerShell 2.0, this approach is the closest equivalent to the wget command found in Linux systems.
Invoke-WebRequest -Uri "http://example.com/file.zip" -OutFile "C:\Downloads\file.zip"
Even though PowerShell 2.0 is an older, deprecated version—officially deprecated by Microsoft in 2017 and originally released with Windows 7 in 2009—many system administrators and developers still encounter legacy servers or specialized environments that rely on it.
$webClient = New-Object System.Net.WebClient $webClient.DownloadFile($url, $outputPath) powershell 2.0 download file
# Optional: Use default credentials for intranet sites # $WebClient.UseDefaultCredentials = $true
Even in 2026, legacy is legacy. Keep this script in your toolkit—because when you SSH into that Windows 2008 R2 box at 2 AM, Invoke-WebRequest won't be there to save you, but System.Net.WebClient will.
$wc = New-Object System.Net.WebClient $wc.UseDefaultCredentials = $true $wc.Proxy.Credentials = $wc.Credentials $wc.DownloadFile($url, $path) In PowerShell 2
Whether you are automating patch deployments, retrieving configuration scripts from a remote repository, or troubleshooting an older Windows Server (such as Windows Server 2008 or Windows 7), PowerShell 2.0 provides the tools you need to interact with the web.
# Set timeout (in milliseconds) $webClient.Timeout = $TimeoutSeconds * 1000
This method is highly portable and works instantly on any Windows 7 (PS 2.0) machine without needing to open the PowerShell console. Keep this script in your toolkit—because when you
If you are on an older Windows 10 system and need it, you must enable it via "Turn Windows features on or off" in the Control Panel.
Tell me if you are getting (like SSL/TLS failures or 404/403 errors).
If your script attempts to download a file to the directory from which the script is executing, use the $PSScriptRoot automatic variable in PowerShell 2.0: