I want to block (not unblock) a file with Powershell. I want to cause Windows to believe that a file on disk was downloaded from the internet, or whatever other scenario exists such that files become blocked. I need this to test how some software I'm developing behaves in the presence of a blocked file.
If you're just trying to add the zone identifier you could try something like this:
$data = "[ZoneTransfer]
ZoneId=3"
Set-Content example.txt -Stream "Zone.Identifier" -Value $data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With