Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compress-Archive PowerShell Version 5
<# These 3 commands test the speed that an archive folder is created using different compression values
#>
Measure-Command {Compress-Archive -Path 'C:\Users\Documents\Files\*' -DestinationPath 'C:\Users\Documents\FilesZIPFastest' -CompressionLevel Fastest}
Measure-Command {Compress-Archive -Path 'C:\Users\Documents\Files\*' -DestinationPath 'C:\Users\Documents\FilesZIPNoCompression' -CompressionLevel NoCompression}
Measure-Command {Compress-Archive -Path 'C:\Users\Documents\Files\*' -DestinationPath 'C:\Users\Documents\FilesZIPOptimal' -CompressionLevel Optimal}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.