- Context
I’ve been downloading updates (.msu) files from the Windows Update catalog
As an example, for KB5001330 I go to https://www.catalog.update.microsoft.com/Search.aspx?q=5001330 and click Download
dir ~/downloads/other/*.msu | gi -Stream * | Select Stream,Length
- Problem
I can remove the Zone.Identifier alternate data stream (ADS) using the built-in Unblock-File cmdlet.
dir ~/downloads/other/*.msu | Unblock-File -Verbose dir ~/downloads/other/*.msu | gi -Stream *| Select Stream,Length
But, I doesn’t remove the SmartScreen ADS.
- Solution
Here’s how to remove the SmartScreen alternate data stream (ADS):
dir ~/downloads/other/*.msu | gi -Stream 'SmartScreen' -EA 0| Foreach-Object { Remove-Item -Path $_.FileName -Stream 'SmartScreen' }