Generating MD5 for a json with powershell

This should do what you need

Get-ChildItem -File -Recurse | Get-FileHash -Algorithm MD5 | Select-Object @{name="Name";expression={$_.Path}}, @{name="md5";expression={$_.Hash}} | ConvertTo-Json


How to create a json file that contains file name, path, and md5 hash of all files in a folder using PowerShell 5.1

Takes a little more than one second per file.

pushd $env:userprofile\desktop
Get-FileHash (gci *.*) -Algorithm MD5 | convertto-json | out-file hash.json
popd 
exit

powershell hash md5

powershell generate a JSON object for each file

Tags:

Powershell