Tag Archive for Log Files

PowerShell Commandlet – Compress-Archive to create zip files


As I am constantly dealing with log file management on my servers, I have always relied on batch files to use PowerShell commandlets to move log files. And then I had to run other processes to manage the log files in a destination area.



I found this handy PowerShell commandlet called Compress-Archive.  You will need PowerShell version 5.0.

The link to the official documentation.

Anyway, this little routine has saved me some steps and with my log file management issues.

I simply zip files with and have the destination path in the same line.

I used example #3.  (This is not my exact script that I wrote, just showing the example.)

Compress-Archive -Path C:\Reference\* -Update -DestinationPath C:\Archives\Draft.Zip


I hope this tid-bit helps all of my fellow techies out there.

~Tony Maddin~