To download a file in Windows 11 from a direct URL, use Invoke-WebRequest with -OutFile to save the response to a path you choose. That works in Windows PowerShell 5.1, the version built into Windows 11, and in PowerShell 7 if you have installed it separately. The two shells differ in a few details, so check which one you are running before you copy a command.
Check which PowerShell you are running
Windows 11 includes Windows PowerShell 5.1. PowerShell 7 is a separate install with its own executable, pwsh. Commands and aliases can behave differently between them, so confirm your version first.
As an Amazon Associate I earn from qualifying purchases.
- Click Start, type
powershell, and open Windows PowerShell. - Run
$PSVersionTable.PSVersion. A result beginning with5.1means Windows PowerShell 5.1. - If you have PowerShell 7 installed, open it from Start by searching for
PowerShell 7, or runpwshfrom any terminal. Its version will begin with7.
Method 1: Invoke-WebRequest with -OutFile
This is the native PowerShell approach for saving one HTTP or HTTPS response to a file. The example below builds the destination under your Downloads folder with Join-Path and passes it to -OutFile.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall$url = 'https://example.com/file.zip'
$out = Join-Path $env:USERPROFILE 'Downloadsfile.zip'
Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $out
Replace the example URL with the direct link to the file. A direct link points at the file itself, not at a web page that has a download button.
#1 Best Overall
- 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
Why the -UseBasicParsing switch appears
Microsoft’s Windows PowerShell 5.1 documentation for Invoke-WebRequest says that after the December 9, 2025 security update, the cmdlet can show a prompt about script-execution risk when it parses web page content. Its recommended action is to use the switch: “Use the -UseBasicParsing switch to avoid script code execution.” Add -UseBasicParsing to avoid that prompt on an updated Windows PowerShell 5.1 system.
In PowerShell 7, basic parsing is the only mode. The switch is kept for backward compatibility, so it has no effect there and is harmless to include. The PowerShell 7.6 reference for Invoke-WebRequest documents this behavior.
Rank #2
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
This cmdlet downloads one file per command. For several files, put the call in a loop.
Method 2: curl.exe
Windows includes a curl executable, and it is useful if you already know curl’s syntax. The trap is the name. In Windows PowerShell 5.1, curl is a built-in alias for Invoke-WebRequest, and it accepts different parameters. A command such as curl -O therefore will not run as curl. Write curl.exe explicitly to reach the real program.
Rank #3
- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
curl.exe -L -o "$env:USERPROFILEDownloadsfile.zip" 'https://example.com/file.zip'
The -L option tells curl to follow redirects, and -o sets the local filename. Microsoft’s curl on Windows documentation also shows curl.exe -O, which saves the file under the name the server provides. Use -o when you want a specific name. The full option list is in curl’s own documentation, not in the Windows page.
Method 3: Start-BitsTransfer
Background Intelligent Transfer Service (BITS) is the transfer service Windows uses for managed downloads. Start-BitsTransfer creates a BITS transfer job from a source and a destination.
Rank #4
- EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
- 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
- RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
- ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
- LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.
Start-BitsTransfer -Source 'https://example.com/file.zip' -Destination "$env:USERPROFILEDownloadsfile.zip"
By default the command waits until the transfer completes or fails, so the prompt stays busy during the download. Microsoft’s Start-BitsTransfer reference describes the cmdlet, its download behavior, and an asynchronous option for running the job in the background. The same reference confirms that BITS can handle multiple files in one job. The documentation does not establish that BITS is faster than the other two methods, so choose it for its job-management features rather than for speed.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Which command to choose
| Situation | Command | Points to note |
|---|---|---|
| One file, you want a PowerShell-native command | Invoke-WebRequest -OutFile |
Add -UseBasicParsing on updated Windows PowerShell 5.1. |
| You know curl syntax or want its options | curl.exe |
Always write curl.exe in Windows PowerShell 5.1, because bare curl is an alias there. |
| Managed transfer, several files, or background job | Start-BitsTransfer |
Runs as a BITS job; the Microsoft reference documents asynchronous mode. |
Any of the three can save the file to the same path, so decide based on which tool you are comfortable scripting with and whether you need a managed transfer.
Best Value
- 【Efficient Performance】 Powered by Intel Core i3 processor (2 cores, 4 threads, up to 3.4GHz) with 12GB RAM and 256GB SSD. Handles multitasking, office software, online classes, and HD video streaming smoothly. Integrated Intel UHD Graphics 620
- Backlit Keyboard & Complete Package】Comes with a cool backlit keyboard. Comes with awebcam, dual stereo speakers (8Ω/1.0W each), DC charger, and user manual – ready for late-night studying, online classes, video conferencing, and daily productivity
- 【Vibrant Display】 15.6-inch Full HD (1920x1080) anti-glare screen with 16:9 aspect ratio delivers crisp images and vivid colors – perfect for studying, watching lectures, or entertainment. Thin-bezel design maximizes viewing area
- 【Fast Connectivity & Expansion】 Equipped with WiFi 6 (802.11ax) and Bluetooth 5.2 for stable, high-speed wireless. Features 3 x USB 3.0, HDMI 2.1, Type-C (supports PD3.0 fast charging), and a TF card slot expandable up to 2TB – easily connect external monitors, mice, drives, or expand storage for all your files
- 【Long Battery Life & Portable】 Built-in 11.55V 5000mAh/57.75Wh high-capacity battery delivers approximately 7 hours of mixed-use battery life – enough for a full day of classes and assignments. Lightweight at just 1.63kg (3.6 lbs) and 19.5mm thin, plus a compact packing size – easily slips into a backpack for campus, library, or coffee shop
Troubleshooting
- Invoke-WebRequest stops with a prompt about script execution in Windows PowerShell 5.1. Add
-UseBasicParsing, as described under Method 1. - A curl command runs as a PowerShell web request. You are in Windows PowerShell 5.1 and used the bare
curlalias. Usecurl.exe. - The download fails with a certificate or connection error. Confirm the URL is correct and uses HTTPS where the site offers it. Do not turn off certificate validation as a routine fix; if you must, treat that as a separate security decision about the source.
- The file saved but is an HTML page, not the file you wanted. The URL probably points to a landing page. Find the direct file link on the publisher’s site and run the command again.
- The destination folder does not exist. Create it first with
New-Item -ItemType Directory -Path "$env:USERPROFILEDownloadsTools" -Force, then use that path in-OutFileor-Destination.
Before you run a downloaded script or program
A successful transfer does not establish that a file is safe. Microsoft’s about_Execution_Policies documentation notes that download methods such as curl.exe and Invoke-WebRequest may not mark the file as coming from the Internet Zone, which is the marking that execution policy and some Windows warnings rely on. Obtain scripts and programs only from a publisher you trust, read a script before running it, and check the file against any published checksum the publisher provides.
What these commands cannot do
The Microsoft pages cited here cover basic transfers. They do not show that these commands can pass a login screen, accept a session cookie from a browser, or complete a download that requires clicking through a consent page. If a site needs sign-in or a browser step, use the download method the publisher supports, or an authorized direct link. Similarly, if the server does not expose a direct file URL, no PowerShell command will fetch it in a single step.
PowerShell’s download commands are built into Windows, so no extra module or paid tool is needed for any of the three methods above.
Keep the Windows PowerShell 5.1 and PowerShell 7 distinction in mind when you share scripts with others. A script that works in one may need the curl.exe or -UseBasicParsing adjustments described here to work in the other.
Quick Recap
The Bottom Line
“”
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




