If you have already created pfx certificate then there are 2 ways to generate .CER certificate. As you know pfx certificate will have both private and public key whereas authentication certificate (.CER) will have the public key only.