Although you can use File Explorer to quickly create a zip file or extract the contents of a zipped file, you can also use PowerShell to perform the same tasks more efficiently. In addition, you can even select the compression ratio to zip files even faster or optimize to save space. In this guide, you’ll learn the steps to zip and unzip files and folders using PowerShell commands on Windows 10.
How to zip files using PowerShell How to add more files to zip using PowerShell How to change zip compression ratio using PowerShell How to unzip files using PowerShell
How to zip files using PowerShell
To compress files using zip with PowerShell on Windows 10, use these steps: Once you complete the steps, PowerShell will compress the folder and all its content creating a new .zip file with a compressed version of the files. In the command make sure to change the source and destination with your specific paths. The wildcard “*” tells the command to compress all the contents of the source folder.
How to add more files to zip using PowerShell
To update zip file with more files using PowerShell, use these steps: After you complete the steps, the zip folder will be updated with the new files that you specified in the command. In the command make sure to change the source and destination with your specific paths.
How to change zip compression ratio using PowerShell
To change the compression ratio of zip file using PowerShell, use these steps: If you want to specify the zip compression ratio make sure to set the CompressionLevel flag with the ratio you want: In the command make sure to change the source and destination with your specific paths.
Fastest: Uses less time to compress files, but it may result on zip file being larger. NoCompression: Uses no compression resulting on a zip file that is the same size as the total amount of the uncompressed files. Optimal: Uses more time, but it compresses the files with the highest ratio.
Once you complete the steps, the zip folder will be created using the compression ratio that you specified.
How to unzip files using PowerShell
To uncompress zip file using PowerShell on Windows 10, use these steps: After you complete the steps, PowerShell with extract all the files and folders from the zip container that you specified. In the command make sure to change the source and destination with your specific paths. While we’re focusing this guide on Windows 10, you can also use these instructions on Windows 8.1 and Windows 7. All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.