When downloading files from the internet or copying them from a (foreign) server, these files will be marked as blocked by default.
Each file can be unblocked by right-clicking the file and manually selecting unblock, but what if you have a whole bunch of files to unblock? In that case you can use Powershell:
Get-Item -Path "$env:windir\Fonts\*" -Stream "Zone.Identifier" -ErrorAction SilentlyContinue | % { Unblock-File -Path $_.FileName }
The oneliner above consists of two parts:
In the example above, we are running this on the Fonts folder to unblock all font files that have been installed from a foreign server (in fact, by another script). It goes without saying that when operating on restricted folders (such as C:\Windows\Fonts), you will need to run this as admin.
« ‹ | November 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |