How to Unblock Multiple Files on Windows With PowerShell
Oct 15, 2025 am 04:42 AMYou may have downloaded some files to a folder on your computer, but Windows prompts that the files are not trusted. This situation is actually very common, because some files from the Internet may indeed pose a threat to the system. However, what if you are absolutely certain that these files are safe? Fortunately, you can quickly unblock these files in bulk using a simple PowerShell command.
How to unblock multiple files on Windows using PowerShell?
Normally, you can unblock an individual file by right-clicking on it and selecting Properties . If you are using Windows 11, you need to click Show more options before you can see properties in the right-click menu. After entering the properties window, switch to the General tab and check Unblock in the Security area at the bottom.
But if you have multiple files to process, operating one by one is obviously inefficient. At this time, you can use PowerShell to unblock all files in the entire directory at once. The command format is as follows:
<code>dir [路徑] | unblock-file -confirm</code> Just put in square brackets <code>dir [路徑] | unblock-file -confirm</code>
Path can be replaced with the actual folder path. You can quickly obtain the path by right-clicking on the target folder and selecting Copy as path .
After obtaining the path, follow the steps below to execute the unblock command in PowerShell:
- Press Win S to open Windows Search.
- Enter powershell in the search box, right-click the program in the search results, and select Run as administrator . For more ways to get started, check out our detailed guide on how to open PowerShell.
- Enter the above unblock command in PowerShell and press Enter to execute. The effect is as shown below:
- The system will ask whether to unblock each file one by one. Enter Y (yes) or N (no) and press Enter. This confirmation step is triggered by the -confirm parameter in the command. This parameter is optional, you can delete it, or enter A to confirm once and for all to unblock all files in the directory.
Additionally, you can set Windows to always trust files you download from the Internet. For specific methods, please refer to our tutorial on how to disable Windows 10 from automatically blocking downloaded files. This tutorial uses the Registry Editor and the Local Group Policy Editor to set up, and it also applies to Windows 11 systems.
Now you know how to safely unblock trusted files
Through the above method, you can easily unblock multiple files in the download directory in batches. But remember: only do this for files that you completely trust. It's important to keep your system secure and not inadvertently expose your computer to unnecessary risks.
The above is the detailed content of How to Unblock Multiple Files on Windows With PowerShell. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

ArtGPT
AI image generator for creative art from text prompts.

Stock Market GPT
AI powered investment research for smarter decisions

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Most players probably play their games full screen in Windows 11 or 10. However, you can also play games in a windowed mode. This mode lets you play games in a window with the taskbar visible beneath it. The advantages of playing in windowed mode

Answer: The computer cannot recognize the printer. It is usually caused by connection, drive, or service issues. First check whether the USB or network connection is normal to ensure that the printer is powered on; if the connection is correct, restart the device and check the driver status in the "Device Manager", update or reinstall the official website driver; confirm that the Windows "PrintSpooler" service has been started and set to automatic; use the system "Troubleshooting" tool to troubleshoot problems. If the driver fails to install repeatedly, you need to completely uninstall the old driver and clean up the residual files. After restarting, install the new version of the driver as an administrator, and use compatibility mode or system restore if necessary. If there is any problem after Windows update, you should first download the driver that is adapted to the new system, or roll back the update and check the service status. The details that are easily overlooked during the investigation include

When the file is occupied, first check and close the relevant programs and try to restart the computer; if it is invalid, use task manager, resource monitor or ProcessExplorer to locate the occupied process, and forcefully terminate it by ending the task or taskkill command; for prevention, you need to develop good operating habits, avoid previewing or directly operating on mobile/network drives, and keep software updated.

A Virtual Private Network (VPN) is a crucial tool for safeguarding your online privacy and securely accessing geo-restricted or censored content. However, many users face difficulties when their VPN fails to connect on Windows 10 or Windows 11.Why Wo

Ifaprogramwon’tuninstall,trythesesteps:1.UseWindowsSettingstoremoveit.2.Runitsbuilt-inuninstallerasadministrator.3.BootintoSafeModeandattemptremoval.4.Usethird-partytoolslikeRevoUninstaller.5.Manuallydeletefilesandregistryentrieswithcaution.

The most direct way is to recall the storage location, usually in folders such as desktop, documents, downloads, etc.; if it cannot be found, you can use the system search function. File "missing" is mostly due to problems such as unattention of the saving path, name memory deviation, file hiding or cloud synchronization. Efficient management suggestions: Classify by project, time, and type, make good use of quick access, clean and archive regularly, and standardize naming. Windows search and search through File Explorer and taskbar, while macOS relies on finder and Spotlight, which is smarter and more efficient. Mastering tools and developing good habits is the key.

The read and write speed of mechanical hard disks is determined by the speed, data density, cache size, interface type and seek time. High speed shortens latency, high density improves linear speed, large cache optimizes random read and write, while fragmentation and background programs slow down the actual experience.

The battery life of Windows laptops has never been excellent, at least without making any settings. But with these tips, your laptop can easily run 24/7 – no longer have to look for power outlets everywhere. 5 Check your GPU settings The standalone graphics card consumes much more power than integrated graphics cards. This is one of the reasons for the performance improvements in gaming, but it also greatly reduces battery life. If your laptop supports MUX switches or allows disabling discrete graphics cards, turning on this feature will significantly extend battery life. Some notebooks offer two GPU modes: hybrid mode and integrated mode. In hybrid mode, both graphics cards work at the same time, which is also the default operation method of most laptops with independent graphics. If you want to extend the battery
