Skip to content

Instantly share code, notes, and snippets.

@gazd25
gazd25 / renewexchangecert.ps1
Created June 12, 2018 07:44
Powershell Script for automating LetsEncrypt certificate renewal on Exchange 2013/2016
# Add Exchange management tools snappin
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;
# Create new self signed certificate to be used only during script
[void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms")
[System.Windows.Forms.SendKeys]::SendWait("N")
Start-Sleep 1
[System.Windows.Forms.SendKeys]::SendWait('{ENTER}')