Exercise 3: Why the Emailed Script Needs Unblock-File — Possible Solution ==================================================================== WHY THE SCRIPT FAILS TO RUN AT FIRST ------------------------------ Per Chapter 10, Windows tags any file that arrived via a browser, email client, or similar download path with a hidden NTFS marker called the Mark of the Web (technically a Zone.Identifier alternate data stream). The script Dana's colleague emailed over picked up this tag the moment it was saved as an email attachment - it doesn't matter that Dana personally wrote and reviewed the underlying code; what matters to RemoteSigned is how the specific FILE arrived on the machine. Since RemoteSigned requires a valid signature on any file carrying that tag, and this script has no such signature, running it fails. WHY Unblock-File FIXES IT ------------------------------ Unblock-File removes the Mark of the Web from a specific file - it doesn't change the script's contents at all, it just clears the tag that marked it as having arrived from an external source. Once that tag is gone, RemoteSigned no longer treats the script as "remote," and it can run freely, the same as any script Dana had typed and saved directly. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly identifies the Mark of the Web / Zone.Identifier tag (not the code's origin or content) as the reason the script initially fails, and correctly explains that Unblock-File resolves the issue by removing that specific tag rather than by altering the script or bypassing execution policy globally.