0

This is what I am doing on linux

cat a-directory/* | md5

What would be the alternative in PowerShell, maybe something with CertUtil?

The reason I am doing this is that I want to make sure I can copy a large directory.

3
  • 4
    Get-FileHash, but consider using Robocopy instead of rolling your own solution. Commented Jun 12, 2020 at 12:16
  • bash -c "cat directory | md5sum" Commented Jun 12, 2020 at 16:33
  • 2
    This definitely won't win any beauty awards, but at least returns the same result: ([System.Security.Cryptography.HashAlgorithm]::Create('MD5').ComputeHash([System.Text.Encoding]::UTF8.GetBytes((gc C:\a-directory\*.*) -join '')) | % { $_.ToString('x2') }) -join '' Commented Jun 14, 2020 at 13:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.