Looking for a PowerShell script to compare two folders recursively

powershell

Solution

Easy enough to do something simple:

$d1 = get-childitem -path $dir1 -recurse
$d2 = get-childitem -path $dir2 -recurse
compare-object $d1 $d2

More sophistication required depending on the definition of difference.

Problem

Just thought it would be nice to have one but my PS skills are not up to task. Anybody can share theirs?

Original source