Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get Powershell to compare MD5 hashes of folders

Posted on 2014-12-11
6
Medium Priority
?
287 Views
Last Modified: 2014-12-12
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
0
Comment
Question by:Phil Mapfumo
  • 3
  • 3
6 Comments
 

Expert Comment

by:iftech
ID: 40493648
you wont get much help without showing the code you are trying to use.
0
 
LVL 1

Author Comment

by:Phil Mapfumo
ID: 40493659
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)
0
 

Accepted Solution

by:
iftech earned 1500 total points
ID: 40493709
I did some quick tests and my results are as follows.  When the two directories have exactly the same contents, there was no output at all. I changed a single file and the output is as expected.

I would recommend double checking your folders, make sure you have contents that are different.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Phil Mapfumo
ID: 40494342
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.
0
 

Expert Comment

by:iftech
ID: 40494371
i suppose if you are comparing TB's of data you should see powershell.exe in your task manager using some resources
0
 
LVL 1

Author Comment

by:Phil Mapfumo
ID: 40495864
I have managed to run the command with slightly different data and I did get a response,  many thanks for that!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction People like FTP.  It's a solid, stable, robust protocol for quickly transferring files between two hosts using TCP/IP.  In most cases it's much faster than SMB or CIFS, and certainly much easier to set up between organizations.  This…
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question