Convert pfx certificate to base64 string using Powershell
Use the below script to convert to pfx certificate to convert to Base64 string using Powershell
$fileContentBytes = get-content 'C:\Temp\DOClientTestCert.pfx' -Encoding Byte
[System.Convert]::ToBase64String($fileContentBytes) | Out-File 'C:\Temp\DOClientTestCert_base64.txt'
Reference :
https://sivapalla.wordpress.com/2016/03/05/convert-pfx-certificate-to-base64-string-using-powershell/
Note: This post directly copy from above link , just to keep a kind of handy document with me , no any intention to copy. If require i can delete it.
Regards
Kundan