Sign PowerShell Scripts with a User Code-Signing Certificate and Log

This script signs a PowerShell script with a code-signing certificate from the current user certificate store. It first searches for a certificate that matches the configured certificate name, checks whether it is still valid, and then applies a digital signature to the selected script. After signing, it writes a CSV log entry so the signing … Weiterlesen

Publish S/MIME Certificates to the Exchange Online GAL with PowerShell

In environments with internal PKI and Exchange Online, publishing S/MIME certificates centrally can save a lot of manual work. This PowerShell script exports public user S/MIME certificates from Active Directory, stores them as .cer files, and then writes them to Exchange Online mailbox attributes so they are available through the Global Address List (GAL). S/MIME in Exchange … Weiterlesen

Reissue Certificates and Generating CSRs for an Internal Microsoft CA via Powershell

In many environments, operational certificates for web servers and services are still requested manually via MMC or the web enrollment pages. This PowerShell script automates that process by generating a certificate signing request (CSR), submitting it directly to a Microsoft Enterprise CA, and optionally exporting the issued certificate as a PFX file. The script supports … Weiterlesen

How I Confirmed the S/MIME Certificate Chain in Exchange Online

When troubleshooting S/MIME in Exchange Online with Microsoft support, one of the key questions was: Is our internal CA certificate chain really stored correctly in the tenant? Exchange Online does not only rely on public online CAs; it maintains its own virtual certificate collection for S/MIME trust, which Outlook Mobile then uses to validate user certificates. To … Weiterlesen

Powershell S/MIME Certificat Exporter

I needed a script to export S/MIME encryption certificates for a client migration. The script requires that the S/MIME private key be exportable. If it isn’t, the certificate can only be recovered at the CA using a Key Recovery Agent (if configured) or Mimikaz 😉 The search routine for the correct certificate may also need … Weiterlesen