Link to home
Start Free TrialLog in
Avatar of Phil Mapfumo
Phil MapfumoFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to get Powershell to compare MD5 hashes of folders

Hi
 I am trying to get MD5 hashes of folders with sensitive information . I have found the link below. However when l run a test to compary the folders. I do not get any response from Powershell. I have upgraded the version of Powershell to version 3 and  I have imported the PSCX modules to enable it to work. I would appreciate any assistance.

http://blogs.technet.com/b/heyscriptingguy/archive/2012/05/31/use-powershell-to-compute-md5-hashes-and-find-changed-files.aspx
Avatar of iftech
iftech

you wont get much help without showing the code you are trying to use.
Avatar of Phil Mapfumo

ASKER

Sorry here is the code l am trying to use. I have tried to run it with on 2 test folders  with similar data but l don't get a  response, Powershell does not give out any errors or return any information

PS C:\> Compare-Object -ReferenceObject (dir c:\ref -Recurse | Where-Object {!$_.psis
 
container } | get-hash) -differenceObject (dir c:\changed -Recurse | Where-Object {!$
 
_.psiscontainer } | get-hash)
ASKER CERTIFIED SOLUTION
Avatar of iftech
iftech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Okay thanks l will run a test as well with sightly different contents, however is there a way to see if the MD5 check is still running as l have a few folders that l have  copied that have similar data but contain terabytes of data, that l need to verify contain the same data.
i suppose if you are comparing TB's of data you should see powershell.exe in your task manager using some resources
I have managed to run the command with slightly different data and I did get a response,  many thanks for that!