Last active
September 21, 2017 23:50
-
-
Save mattwoolnough/45ff0ff0a62b5f4084b72122ce48e444 to your computer and use it in GitHub Desktop.
Compare hashes of files in two directories (recursive)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$SourceDocs = Get-ChildItem -Recurse –Path "\\172.16.97.19\c$\Program Files\Folder to Check\" | foreach {Get-FileHash –Path $_.FullName} | |
$DestDocs = Get-ChildItem -Recurse –Path "C:\Program Files\Program Files\Folder to Check\" | foreach {Get-FileHash –Path $_.FullName} | |
(Compare-Object -ReferenceObject $SourceDocs -DifferenceObject $DestDocs -Property hash -PassThru).Path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment