I would like to calculate an MD5 checksum of some content. How do I do this in PowerShell?
As stated in the accepted answer, Get-FileHash is easy to use with files, but it is also possible to use it with strings:
$s = "asdf" Get-FileHash -InputStream ([System.IO.MemoryStream]::New([System.Text.Encoding]::ASCII.GetBytes($s)))