Let's keep the ball rolling, with the bellow PS, I can export the .pfx file with password to some folder where SM can grab it:
$CertPassword = '123456789'
$CertDNSName = '<domain name>'
$SecurePassword = ConvertTo-SecureString -String $CertPassword `
-AsPlainText `
-Force
$CertFileFullPath = $(Join-Path (Split-Path -Parent 'D:\_Server\Cert\') "$CertDNSName.pfx")
$NewCert = New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My `
-DnsName $CertDNSName
Export-PfxCertificate -FilePath $CertFileFullPath `
-Password $SecurePassword `
-Cert $NewCert