Written by 5:36 pm Microsoft, PowerShell, Virtualization, Windows, Windows Server

Compress or Expand ZIP Archive using PowerShell

PowerShell Compress-Archive

I was blogging about some of the new features of PowerShell 5 in several blog posts. Another great enhancement of PowerShell v5 is the Compress-Archive and the Expand-Archive cmdlets which allow you to compress or expand a ZIP archive.

To simply create a new ZIP archive using PowerShell you can use the following cmdlet:

Compress-Archive -Path C:\Temp\Files\ -DestinationPath C:\Temp\Files.zip

To unzip the ZIP Archive you can use the following cmdlet:

Expand-Archive -Path C:\temp\Files.zip -DestinationPath C:\Temp\files02\

Tags: , , , , , , , Last modified: September 2, 2018
Close Search Window