New-SelfSignedCertificate -DnsName "KnowYourToolset Cert Authority" -CertStoreLocation "Cert:\LocalMachine\My" -KeyUsage CertSign,CRLSign
Creates root authority with permission to sign stuff
Export-Certificate -Cert Cert:\LocalMachine\My\<CERTHUMB> -FilePath kytroot.cer
Import-Certificate -FilePath .\kytroot.cer -CertStoreLocation Cert:\LocalMachine\Root
This is the public key and could be imported on any machine you want to trust SSL certs on
$rootcert = (Get-ChildItem -Path Cert:\LocalMachine\My\<CERTHUMB>)
The my is important here -- this needs to be in a place where the private key is available
New-SelfSignedCertificate -DnsName "todo.knowyourtoolset.com" -CertStoreLocation Cert:\LocalMachine\My -Signer $rootcert
If you need to move RootAuthority around:
Export-PfxCertificate
If you need to put your domain pfx on more servers: Export-PfxCertificate with secretstring pwd, then import to LocalMachine\My wherever Thumbprint is constant