Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say we have a archive containing a hello.ps1 file. My question isn't specific to PowerShell, I'm merely using a PowerShell script as an example.

  1. Upload to a server.
  2. Download
  3. Recent versions of Windows will mark the file as unsafe and block it (right-click -> Properties.

If I now uncompress from the shell (right-click -> Extract All... or similar), the extracted files will carry over the blocking. If, however, the extraction happens from the command line, the uncompressed files will be unblocked.

In the case of the script above —with a RemoteSigned execution policy in place for PowerShell—, in the first case the script will be unable to run, whilst in the second it will execute normally.

I would like to understand why the blocking works differently depending on how the archive is uncompressed.

share|improve this question

closed as not constructive by Linker3000, Nifle, MaQleod, Renan, Dennis Jul 15 '12 at 4:35

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

It's possible that you found a bug.

But it most likely is "by design" since so much uncompressing goes on by command line in the background and during installations of some apps, that having those blocked, too, could lead to problems for the uninitiated and wasted time for the initiated. Certainly administrators would not want to deal with it, and normal users would not be using a command line to open them in the first place.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .