Create a .zip File Using PowerShell

This KB will show you how to use PowerShell to ZIP files to a .Zip format and Unzip them

To start make sure you have Windows Management Framework 5.0 (PowerShell 5) Installed on your machine, If not download It from Microsoft Download Center.

One Downloaded use the cmdlet below to create .ZIP file:


In this example I’m compressing SQL Express Installation file:

Compress-Archive C:\Files\SQLEXPRWT_x64_ENU.exe -DestinationPath C:\Files\

This Is the file Before

This Is after

To unzip a Zip file use:

Expand-Archive C:\Files\ -DestinationPath C:\Files