Add ability to open password-protected ZIPs
Originally posted on Connect by Mark Wilson and now on UserVoice:
Please add a -Password switch to Expand-Archive so that it can open password-protected archive files. These files can currently be opened only through the GUI.
I support this idea. The question is: are we really going to call it "Password" or "Credential"? Credential with its username is kind of ambiguous here. It should be accepted as secure string only either way.
I think [-Password <SecureString>] makes more sense in this case.
It's my understanding the underlying Windows OS doesn't support this and has always been enabled via third party tools like 7zip and WinZip, is my thinking invalid now?
@imposhster I believe you are correct that the libraries this module depends on doesn't support it
ITNOA
I think for add this ability, we need first add this ability to dotnet framework, so we have request this feature in .Net community
It may be better to move to a 3rd party library that already supports passwords like https://github.com/icsharpcode/SharpZipLib which also supports gzip, tar, etc... and might also support zips larger than 4GB which is also a limiting factor with .NET's implementation
@SteveL-MSFT So if you think this library stable enough, you can change Microsoft.PowerShell.Archive to use 3rd party open source library. I think this ability is very useful for powershell.
I haven't done enough analysis to determine if moving to SharpZipLib is the right decision. I'll leave that to @anmenaga. However, the limits of the .NET APIs is quite apparent.