Compress-Archive
A cmdlet in PowerShell is used to create compressed (zipped) archive files. More information: https://learn.microsoft.com/powershell/module/microsoft.powershell.archive/compress-archive.
- Compress a single file:
Compress-Archive -Path -DestinationPath
- Compress multiple files:
Compress-Archive -Path -DestinationPath
- Compress a directory:
Compress-Archive -Path -DestinationPath
- Update an existing archive:
Compress-Archive -Path -DestinationPath -Update
- Set compression level:
Compress-Archive -Path -DestinationPath -CompressionLevel
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
