Trying to get password has for a login through PowerShell
For SQL 2005+

Invoke-Sqlcmd -Query "SELECT sys.fn_varbintohexstr(CONVERT(VARBINARY(MAX), LOGINPROPERTY('$LoginName', 'PASSWORDHASH'))) as PasswordHash"  -ServerInstance $SourceInstance


You can't use this for everything as it has length limitations, but for this purpose it will be fine.