Check-MD5

Here’s a great function to generate the MD5 hash of a specified string.

function Check-MD5 ($string) {
[Reflection.Assembly]::LoadWithPartialName("System.Web") | Out-null
[System.Web.Security.FormsAuthentication]::HashPasswordForStoringInConfigFile("$string", "MD5")
}

Leave a Reply

Scroll to Top