How To: Reset Domain TLS Certificate using Sqlite3 and PowerShell
Question
How do I reset the TLS certificate for a domain using the PowerShell API?
Answer
You can reset the domain TLS certificate via the PowerShell API by executing the appropriate command that targets the domain object and triggers a certificate renewal or reissue.
Pre-requisites
Pre install sqlite3
Steps
C:\sqlite3.exe "C:\ProgramData\South River Technologies\srxserver\database\lasdb.db" "SELECT * FROM nxKeys";
UPDATE nxKeys
SET document = readfile(‘Path/to/your/certificate/defaultcert.txt’) WHERE keyguid = 'KeyGuidFromStep1';
Get-Content "path\tp\your\sql\file\update.sql" | `
& "C:\sqlite3.exe" "C:\ProgramData\South River Technologies\srxserver\database\lasdb.db"