How to sign and encrypt a message using S/MIME in PowerShell
问题 I am attempting to create a PowerShell script that will: Build a message Sign the message using my private S/MIME certificate Encrypt the message using the S/MIME public cert of the recipient Send the email that has been signed and encrypted I have included the full script below but changed email addresses, cert names, etc. The private cert has been imported onto the machine using Internet Explorer. It is then referenced within the directory C:\Users\xxx\AppData\Roaming\Microsoft