PowerShell_unix PowerShell is definitely gaining momentum in the windows scripting world but I still hear folks wanting to rely on Unix based tools to get their job done.  In this series of posts I’m going to look at converting some of the more popular Unix based tools to PowerShell.

md5

The Unix “md5” command (aliased to “openssl dgst –md5” or “md5sum”) calculates and verifies 128-bit MD5 hashes as described in RFC 1321.  The MD5 hash (or checksum) functions as a compact digital fingerprint of a file.  It is extremely unlikely that any two non-identical files existing in the real world will have the same MD5 hash.

The “openssl dgst –md5” option, there is a “-c” option to include colons between the two digit groups in the digest.  The “md5sum” command does not.  I’ve opted to use the output format of the “openssl” version of the command for my PowerShell function.

Unix PowerShell Description
-c -colons Print the digest in two-digit groups
separated by colons.