compress-archive
A cmdlet in PowerShell is used to create compressed (zipped) archive files. tldr-pages
On Windows
Windows
Compress a single file
Compress-Archive -Path path\to\file.txt -DestinationPath path\to\file.zipIdentifyCompress multiple files
Compress-Archive -Path path\to\file1, path\to\file2, ... -DestinationPath path\to\files.zipIdentifyCompress a directory
Compress-Archive -Path path\to\directory -DestinationPath path\to\directory.zipIdentifyUpdate an existing archive
Compress-Archive -Path path\to\file -DestinationPath path\to\directory.zip -UpdateIdentifySet compression level
Compress-Archive -Path path\to\directory -DestinationPath path\to\directory.zip -CompressionLevel OptimalIdentify