After a few comments about the logs, I’ve re-written the logging code in addition to fixing some bugs and cleaning up the function names. Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 13”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 11
Adding a -PassThru option and fixed a very odd bug. Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 11”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 10
Hi. In this part I add some text logging to the script. Not much else I can say really 🙂 Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 10”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 9
Hi. Here’s another update on the Sync-Folder script. The script itself is at that link but in this post I go over the changes I made and how they work.
The main addition is the support for -WhatIf (so you can test the script runs without it making changes). In addition I fixed some odd bugs with the Filter and Exceptions parameters. Plus some more Verbose logging and I tidied up the script a bit (removing some of the cmdlet aliases and replacing them with the full commands). Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 9”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 8
This update corrects an issue where parts of the configuration XML are missing; what if you don’t want Exceptions or Filters? Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 8”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 7
Hi. Here’s another update on the Sync-Folder script. In this update Strict mode goes on, I make sure the statistics reset between runs, the Statistics output is rewritten and I add the option to only sync items that match a $Filter.
Update : I’ve revisited this script a few times with new additions and modifications.The latest full version of the script is here. That post also includes links covering the other revisions to the script. Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 7”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 6
Hi. Here’s another update on the Sync-Folder script here. In this part I add some more code to use literal paths (so that special characters don’t cause the sync to fail) and a report of the numbers of copies, updates, folder removals etc performed.
Update : I’ve revisited this script a few times with new additions and modifications.The latest full version of the script is here. That post also includes links covering the other revisions to the script. Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 6”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 4
Some more additions to the script. In this part I add some additional configuration options, parameter validation and some error-checking.
Update : I’ve revisited this script a few times with new additions and modifications.The latest full version of the script is here. That post also includes links covering the other revisions to the script.
Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 4”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 3
I’ve used the Sync-Folder script quite a bit and I thought it might be time to revisit it, clean it up and add some more functionality.
Here’s what I’m adding in this first part;
- Load all the configuration from an XML file. Useful to allow more complex configurations and a lot easier to edit that parameters or local variables.
- Proper documentation (so that Get-Help returns useful information).
- Allow multiple Source / Target pairs instead of just the one source folder. Multiple copies of the same source is good for extra safe backups.
The script and explanation follows after the line.
Update : I’ve revisited this script a few times with new additions and modifications.The latest full version of the script is here. That post also includes links covering the other revisions to the script.
Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 3”
PowerShell: Synchronizing a Folder (and Sub-Folders) Part 2
I wrote about a script to synchronise the contents of one folder to another here. It worked as a quick and simple backup script and it would replicate files, deletions and sub-folders. I’ve used it quite a bit since that post and I’ve made some special modifications myself.
Details after the break.
Update : I’ve revisited this script a few times with new additions and modifications.The latest full version of the script is here. That post also includes links covering the other revisions to the script.
Continue reading “PowerShell: Synchronizing a Folder (and Sub-Folders) Part 2”