New-SelfSignedCertificate -DnsName myDns.com -Subject "CN=MyNewCert" -certstorelocation cert:\localmachine\my $pwd = ConvertTo-SecureString -String "Some-Strong-Password" -Force -AsPlainText Export-PfxCertificate -cert cert:\localMachine\my\<thumbprint> -FilePath root-authority.pfx -Password $pwd Export-Certificate -Cert cert:\localMachine\my\<thumbprint> -FilePath root-authority.crt