有没有一种方法可以在不使用第三方工具的情况下在 powershell 中对压缩存档进行密码加密?

num*_*dog 7 compression powershell password-protection password-encryption

使用powershell命令压缩文件夹后:

powershell -Command "& {Compress-Archive -Update -Path 'C:\myfolder' -CompressionLevel Optimal -DestinationPath C:\myfolder.zip}"
Run Code Online (Sandbox Code Playgroud)

是否有另一个 powershell 命令来密码保护/加密生成的 myfolder.zip 存档文件?

Con*_*rad 4

截至 2020 年 7 月,Compress-Archive命令行工具tar不提供加密选项。需要第三方应用程序。