PowerShell – Compress files in folder to ZIP

Requirements: PowerShell 5.0

Compress-Archive -Path <PATH of FOLDER> -DestinationPath <path and name of zip>

Example: 1
Compress-Archive -Path C:\Folder1 -DestinationPath archive.zip

Example: 2
Compress-Archive -Path C:\Folder1 -DestinationPath C:\destination\herewego.zip

 

Leave a reply:

Your email address will not be published.

Site Footer