CmdID

CmdID / Commands

compress-archive

A cmdlet in PowerShell is used to create compressed (zipped) archive files. tldr-pages

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from tldr-pages, CC BY 4.0

Compress a single file

Compress-Archive -Path path\to\file.txt -DestinationPath path\to\file.zipIdentify

Compress multiple files

Compress-Archive -Path path\to\file1, path\to\file2, ... -DestinationPath path\to\files.zipIdentify

Compress a directory

Compress-Archive -Path path\to\directory -DestinationPath path\to\directory.zipIdentify

Update an existing archive

Compress-Archive -Path path\to\file -DestinationPath path\to\directory.zip -UpdateIdentify

Set compression level

Compress-Archive -Path path\to\directory -DestinationPath path\to\directory.zip -CompressionLevel OptimalIdentify