Written by James McDonald

February 12, 2024

The performance of both the Windows and Powershell Zip utilities is abysmal

The following Powershell script enables a Zip operation on approximately 0.33GB of data consisting of around 59,000 files to go from minutes down to less than a minute using 7-Zip instead of Powershells Compress-Archive

Ref: https://stackoverflow.com/a/25288780


  • Raise an error if 7zip is missing
  • Create a timestamped filename
  • Use environment variables to locate common directories for portability
  • Skip a folder that should not be included in the resulting zip file using the -xr! syntax
  • Display a nice progress GUI with 7zg.exe

7-Zip GUI pops up so you can view the progress


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

List local disks

GET-CimInstance -query "SELECT * from Win32_DiskDrive" DeviceID Caption Partitions Size Model -------- -------...

Create ISO using Powershell

Usage New-IsoFile -NewIsoFilePath C:\tmp\Hyper-V.iso-sources -ImageName Hyper-V -SourceFilePath 'C:\tmp\Hyper-V'...