After using a powershell command to compress a folder:
powershell -Command "& {Compress-Archive -Update -Path 'C:\myfolder' -CompressionLevel Optimal -DestinationPath C:\myfolder.zip}"
is there another powershell command to password protect/encrypt the resulting myfolder.zip archived file?
Right-click (or press and hold) a file or folder and select Properties. Select the Advanced button and select the Encrypt contents to secure data check box. Select OK to close the Advanced Attributes window, select Apply, and then select OK.
From the "Archive format" field, select zip. Under the "Encryption" section, enter a strong password or passphrase in the "Enter passphrase" field and again in the "Reenter passphrase" field. Ensure the "Encryption method" is AES-256. Onced finished, click OK.
is there another powershell command to password protect/encrypt the resulting myfolder.zip archived file? @iRon he's asking of Encryption, not Extraction. As for the question, neither dotnet framework, nor Windows Shell support encrypted archives.
Encrypt/Decrypt files using symmetrical encryption This PowerShell module includes 3 cmdlets to create an cryptography key, encypt a file, and decrypt a file. This was developed with the idea of testing defenses against ransomware in mind, but can also be used for securely storing and accessing information within a script.
Train and Certify Manage Your Team Security Awareness PowerShell 7-Zip Module Versus Compress-Archive with Encryption PowerShell 5.0 includes two cmdlets for working with compressed Zip files: Compress-Archive and Expand-Archive.
But with the new PowerShell encrypt password modules, securing secrets and passwords now only takes a few commands. This tutorial will teach you how to use the PowerShell Secret Management and Secret Store modules to store and retrieve passwords securely, whether interactively or in scripts.
As of July 2020, Compress-Archive
and the command-line tool tar
do not provide encryption options. A 3rd-party app is required.
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