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 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;

  1. 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.
  2. Proper documentation (so that Get-Help returns useful information).
  3. 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”