We are required to create SSL certificate for Sitecore 9 Installation which is become mandatory, for this we can go with this simple powershell script which will create a SSL along with placing to the Certificate manager personnel and trusted route path, no need to manually go and copy each certificate to trusted route.
$cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\my\ -dnsname SX9xconnect.domin.com
$pwd = ConvertTo-SecureString -String ‘Test11‘ -Force -AsPlainText
$path = ‘cert:\localMachine\my\’ + $cert.thumbprint
Export-PfxCertificate -cert $path -FilePath C:\certificates\test.pfx -Password $pwd
$rootStore = New-Object System.Security.Cryptography.X509Certificates.X509Store -ArgumentList Root, LocalMachine
Make sure the path, Password, and DNS name are changed to proper required values, Marked as bold