Sunday, August 14, 2022

Publish an S/Mime certificate to AD via Powershell

An Outlook for Windows user can choose Option -> Trust Center -> Trust Center Settings -> eMail Security and then Publish to GAL to publish his S/Mime certficiate to the Active Directory environment. However this option is currently missing in Outlook for MAC.

So if such a user wish to publish his certificate into the ActiveDirectory, the user need to use a Windows PC. But thats not always possible, so here is an powershell part which can be used to publish an S/Mime certificate to the ActiveDirectory without MS Outlook:

$cert=New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\temp\cert.cer") 
$certArray = New-Object System.Collections.ArrayList
$certArray.Insert(0,$cert.GetRawCertData())
Set-Mailbox -Identity <UPN des Postfachs> -UserCertificate $certArray

 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

23FollowersFollow
- Advertisement -

Latest Articles