# Add the BCrypt Types/Classes (here I am using Bcrypt from Chocolatey) Add-Type -Path C:\Chocolatey\lib\BCrypt.Net.0.1.0\lib\net35\BCrypt.Net.dll # Import our module Import-Module .\BCrypt.psm1 # Set a workfactor $workfactor = 10 # Create a hash of alice's password $alicehash = Get-BCryptHash -InputString "My Password" -WorkFactor $workfactor # display the password $alicehash # test the plain text "Evil Hacker" against the hash, will return false Test-bCryptHash -PlainText "Evil hacker" -Hash $alicehash # test the plain text "My Password" against the hash, will return true Test-bCryptHash -PlainText "My Password" -Hash $alicehash # Code Snippet from aperturescience.su