_sandbox/Sandbox.ps1

$mypwd = ConvertTo-SecureString -String "WMHS!999&asc2003" -Force -AsPlainText

$newCert = New-SelfSignedCertificate -Subject *.$dnsName -NotAfter $lifetime.AddDays(365) -KeyUsage DigitalSignature, KeyEncipherment -Type SSLServerAuthentication -DnsName *.$dnsName, $dnsName

Get-ChildItem -Path cert:\localMachine\my\$($newCert.Thumbprint) | Export-PfxCertificate -FilePath C:\mypfx.pfx -Password $mypwd -CryptoAlgorithmOption TripleDES_SHA1