How to zip/unzip files in Powershell?

DotNetZip will allow you to do this from PowerShell. It is not a one-liner, but the library will allow you to write the PowerShell script you need.

You can also use the COM interface, see Compress Files with Windows PowerShell then package a Windows Vista Sidebar Gadget.

Googling “zip powershell” or “unzip powershell” might also turn up useful results.

Leave a Comment