Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to password encrypt a compressed archive in powershell without using 3rd party tools?

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?

like image 781
numpdog Avatar asked Feb 18 '20 15:02

numpdog


People also ask

How do I encrypt a compressed zip folder?

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.

How do I password protect a 7zip file?

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 archived files?

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.

How do I encrypt and decrypt a file in PowerShell?

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.

Does PowerShell 7-Zip compress-archive work with encryption?

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.

What are PowerShell encrypt password modules?

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.


Video Answer


1 Answers

As of July 2020, Compress-Archive and the command-line tool tar do not provide encryption options. A 3rd-party app is required.

like image 166
Conrad Avatar answered Sep 17 '22 10:09

Conrad