guidox / Security

Fix a Program Blocked by SmartScreen or Mark of the Web

TL;DR

Check the marker with **Get-Item -Stream Zone.Identifier**, verify the file's signature, then remove it with **Unblock-File**. Never unblock something you have not verified.

Before you start

Requirements

  • Windows 11
  • The downloaded file
  • 10 minutes
Step by step

Instructions

01

Read the zone marker

A file downloaded from the internet carries a **Zone.Identifier** alternate data stream. Zone 3 is the internet, and that is what triggers the prompt.

Get-Item 'C:\temp\setup.exe' -Stream * | Select-Object Stream,Length
Get-Content 'C:\temp\setup.exe' -Stream Zone.Identifier -ErrorAction SilentlyContinue
Get-Item 'C:\temp\setup.exe' | Select-Object Name,Length,LastWriteTime
02

Check the signature before you trust it

An unsigned installer from an unknown source deserves the warning. The status and the signer are the two fields to read.

Get-AuthenticodeSignature 'C:\temp\setup.exe' | Select-Object Status,StatusMessage,@{n='Signer';e={$_.SignerCertificate.Subject}}
Get-FileHash 'C:\temp\setup.exe' -Algorithm SHA256 | Select-Object Hash
certutil -hashfile 'C:\temp\setup.exe' SHA256
03

Remove the marker deliberately

**Unblock-File** deletes the stream, which silences both SmartScreen and the runtime error. The file itself does not change.

Unblock-File -Path 'C:\temp\setup.exe'
Get-Item 'C:\temp\setup.exe' -Stream * | Select-Object Stream,Length
Get-AuthenticodeSignature 'C:\temp\setup.exe' | Select-Object Status
04

Handle a folder full of files

An extracted archive keeps the marker per file. Unblocking before extracting, or unblocking the whole folder recursively, saves a click per file.

Get-ChildItem 'C:\temp\extracted' -Recurse | Unblock-File
Get-ChildItem 'C:\temp\extracted' -Recurse | ForEach-Object { $s = Get-Item $_.FullName -Stream * -ErrorAction SilentlyContinue; if ($s) { $_.FullName } } | Select-Object -First 5
05

Understand when the block is right

SmartScreen reputation is separate from the marker: an unsigned new file from an unknown publisher is blocked even when unblocked. That block is a reputation decision, not a file attribute.

Get-WinEvent -LogName 'Microsoft-Windows-SmartScreen/Debug' -MaxEvents 10 -ErrorAction SilentlyContinue | Select-Object TimeCreated,Id,Message
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' | Select-Object SmartScreenEnabled
Start-Process ms-settings:windowsdefender
06

Verify the program runs and stays clean

Run it, then check the Defender history for anything it caught. A file that needed unblocking and then trips Defender is a file to delete, not to trust.

Start-Process 'C:\temp\setup.exe'
Get-MpThreatDetection -ErrorAction SilentlyContinue | Select-Object -Last 3 InitialDetectionTime,ThreatID,Resources
Get-MpComputerStatus | Select-Object AntivirusEnabled,RealTimeProtectionEnabled,LastQuickScanTime
Troubleshooting

Common issues

Unblock-File does nothing

The file has no marker, and the block comes from reputation or policy. Check the SmartScreen events and the attachment manager policy.

The warning returns after a copy

Copying from a network share adds the marker again. Unblock the copy, or copy from a local drive.

It still refuses to run after unblocking

The binary is blocked by AppLocker or by Defender, not by the zone. Check the Application log for the rule that fired.

Every download is blocked

The SmartScreen setting is set to block, or the device is managed. Check SmartScreenEnabled and the policy keys.

FAQ

Frequently asked

Is unblocking dangerous?

It removes a warning, not a threat. The signature check and a Defender scan are what make the file trustworthy.

Does the marker survive a zip?

The archive carries it, and extracting can propagate it to the extracted files. Unblock the archive before extracting.

Can I disable SmartScreen entirely?

Yes, and you should not. It is one of the few protections that works before a file runs.

How to undo this

The marker cannot be restored by hand. If you want the warning back, re-download the file, or move it from a network share so Explorer adds the zone again.

Changelog · 1 entry
  1. 2026-11-01
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress