$cert = New-SelfSignedCertificate -DnsName www.mysite.com -CertStoreLocation "cert:\LocalMachine\My" -KeyLength 2048 -KeySpec "KeyExchange" -NotBefore 10/15/2019 -NotAfter 10/15/2021
$password
= ConvertTo-SecureString -String "mySecurePassword" -Force -AsPlainText
Export-PfxCertificate
-Cert $cert -FilePath ".\aspire.mysite.com.pfx" -Password $password
Export-Certificate
-Type CERT -Cert $cert -FilePath .\aspire.mysite.com.cer