exporting certificate from user store to PFX using powershell

Alright, so today someone tried to contact me with an interesting email about exporting the certificate user store to PFX using powershell.  Below is the code that was contained in the email:   $cert = (dir cert:\currentuser\my)[0] $type = [System.Security.Cryptography.X509Certificates.X509ContentType]::pfx $pass = read-host “pass” -assecurestring $bytes = $cert.export($type, $pass)   so far so good. Last line of…

2