Avatar of Phil Mapfumo
Phil Mapfumo
Flag 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
Microsoft Server OSServer SoftwareMicrosoft Legacy OS

Avatar of undefined
Last Comment
Phil Mapfumo

8/22/2022 - Mon
iftech

you wont get much help without showing the code you are trying to use.
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
iftech

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Phil Mapfumo

ASKER
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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
iftech

i suppose if you are comparing TB's of data you should see powershell.exe in your task manager using some resources
Phil Mapfumo

ASKER
I have managed to run the command with slightly different data and I did get a response,  many thanks for that!