Generate Self Signed Certificates
List the existing SSL certificates:
Get-ExchangeCertificate | FL
NETBIOS name of Exchange: EX-2k7
Internal FQDN (AD name): EX-2k7.NET.local
External FQDN (Public name): webmail.netometer.com
Autodiscover name: autodiscover.netometer.com
SubjectName: cn=webmail.netometer.com
The command for generating the new Self-Signed SSL cert (uses the names listed above):
New-ExchangeCertificate -FriendlyName "SelfSigned Cert" -SubjectName "cn=webmail.netometer.com" -DomainName EX-2k7,EX-2k7.NET.local,webmail.netometer.com,autodiscover.netometer.com -PrivateKeyExportable $True
Adding Services to Certificate
Get Foot Print:
Get-ExchangeCertificate | FL
Add Service to Servificate:
Enable-ExchangeCertificate -thumbprint "BBB2306EF35037B037EF6A110DFBB68CFEAD27B7" -services IIS
Exporting Certificate
Generate and Store Certificate information into memory:
$file = Export-ExchangeCertificate -Thumbprint 5113ae0233a72fccb75b1d0198628675333d010e -BinaryEncoded:$true -Password (Get-Credential).password
Export Memory to File on drive:
Set-Content -Path "c:\certificates\htcert.pfx" -Value $file.FileData -Encoding Byte
Deleting Previous Certificates
Remove-ExchangeCertificate -thumbprint "C5DD5B60949267AD624618D8492C4C5281FDD10F"