This script will actually work for anything of the form “Copy stuff from static location and zip it up using PowerShell”, however the focus for this article is IIS because IIS logs are huge and when someone asks you at a moment’s notice “Hey, can you get me the logs from the last hour from our 8 web servers”, all of a sudden logging on to 8 servers, navigating to a folder, zipping up files and moving them to your desktop sounds like a mundane task I would rather avoid all together.

Therefore I wrote this script:

https://github.com/dyslexicanaboko/dyslexic-code/blob/master/PowerShell-Scripts/Copy%20and%20Zip%20IIS%20Logs.ps1

Enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *