Create folder backup, with retention
As part of our deployment process, we make a backup of our sites. This is to ensure that we can restore quickly should something go wrong without having to roll to our disaster recovery process. As part of writing this script, we wanted to make sure that we only kept the latest 3 backups. This script was meant to be daisy chained with others in our push process, I’ve left those check in place as someone might find them useful for their own scripting.
Hosts file updater
In our environment, we have load balanced web servers. There are times where one server may be having an issue, while the others remain up and running with no issue. If you are unfortunate enough to be balanced to the server having an issue, your experience will be less than desirable. To help troubleshoot these issues we would test each server by adding their IP to our hosts file. This isn’t too much of an issue for our IT staff, but for folks that don’t mess with their hosts file regularly it can be very cumbersome. To resolve this, I wrote a script that will change their hosts file for them based on their selection. It was a fun exercise, and hopefully someone will find it useful!
Distributed File Copy With Logging
In our environment, we are often required to deploy code that is distributed among several servers. This code is usually part of a scheduled task that is run multiple times or continuously throughout the day. While I know there are simpler ways to accomplish this goal, I did not like the way the logging looked. So, I designed this script to make logging a bit more customizable! I’ve made the script easier to reuse by implementing variables for the pertinent information. Keep in mind that you will have to modify the token value to accommodate a different number of nested folders, etc.
I’ll admit it, I’m not very patient when it comes to DC Replication. When I make a change, I need instant gratification… and I got sick of waiting for the “Active Directory Sites and Services” console to open. To that end, I wrote a script that would take care of my need for speed!