Create New SSL CSR request file | Exchange Powershell

Опубликовано: 13 Июль 2024
на канале: TheCommonFOX
143
0

This is a step by step quickest and easiest way to create a mail server SSL certificate request through Exchange Administrative Shell.
Script is below:

Generate New Certificate Request
***********************************
$txtrequest = New-ExchangeCertificate -GenerateRequest -FriendlyName CERTNAME -SubjectName "C=Seychelles,S=Mahe,L=Victoria,O=yourdomain.com,OU=IT,CN=mail.yourdomain.com" -DomainName mail.yourdomain.com,mail2.yourdomain.com,autodiscover.yourdomain.com -KeySize 2048 -PrivateKeyExportable $True

Import Certificate
******************
[System.IO.File]::WriteAllBytes('\\MAILSERVER\CSRFOLDER\MAIL4CERT.req', [System.Text.Encoding]::Unicode.GetBytes($txtrequest))