Configure SSL certificatite with Powershell script

Problems or questions about Lights-Out on all Windows platforms are answered here
Antworten
Masahiko
Foren-Einsteiger
Beiträge: 6
Registriert: 12. Aug 2017, 01:43

Configure SSL certificatite with Powershell script

Beitrag von Masahiko »

HI, all.

I'm running my Windows Server with Lets' encrypt SSL certificate, and certificate is renewed by powershell spript.
I wanna to configure SSL on Lighs-out through Powershell, too.
Can I configure Lightgs-Out by Powershell script?

Thanks in advance.
JoachimL
WHS-Experte
Beiträge: 1228
Registriert: 21. Sep 2009, 22:48

Re: Configure SSL certificatite with Powershell script

Beitrag von JoachimL »

Hi Masahiko,
assuming you already converted to .pfx, the imho easiest way is to enable central certificate store (CCS, comes with Internet Information Service) and update the certificates there (via powershell or other). In order to get Lights-Out to use CCS you have to excute

Code: Alles auswählen

netsh http add sslcert hostnameport=<your domain here>:7784 appid={12345678-db90-4b66-8b01-88f7af2e36bf}
Without IIS/CCS you can also script like the following

Code: Alles auswählen

certutil -v -p "" -importpfx "MY" <ccs path>\<your domain here>.pfx
"C:\Program Files\AxoNet Software GmbH\LightsOut3\LightsOut2.Server.SSL.exe" -update
Unfortunately the last line was not reliable in some versions of Lights-Out.
Cheers,
Joachim
WHS r.i.p. - Software die nicht mehr gewartet wird sollte man nicht mehr einsetzen.
Bei mir laufen drei Dell T20, inzwischen alle unter Hyper-V-2019. Darauf viele virtuelle Maschinen, darunter Windows 10 Pro, Ubuntu 18.04/20.04 LTS (teilweise mit Docker), und auch mal andere. Ein T20 läuft 7*24 und stellt u.a. Mailcow-Dockerized und einen Samba-Domain-Controller (ein 2. läuft auf einem NUC) bereit. Klingt vielleicht seltsam, aber so ist das System - alle - mit Bitlocker verschlüsselt und kann vollständig und konsistent gesichert werden - beides sonst unter Linux schwierig bis unmöglich. Zum Sichern dient das von mir entwickelte Lindenberg Software Backup.
Fragen bitte nicht per PN sondern im Forum - dann haben andere auch was davon. Ich poste hier in meiner Freizeit, Ungeduld ist meiner Meinung nach fehl am Platz...
Masahiko
Foren-Einsteiger
Beiträge: 6
Registriert: 12. Aug 2017, 01:43

Re: Configure SSL certificatite with Powershell script

Beitrag von Masahiko »

Hi, JoachimL.

I appreciate your support.
I'll try it, and report.

Masahiko
Benutzeravatar
Martin
Moderator
Beiträge: 9947
Registriert: 11. Sep 2007, 10:51
Wohnort: Im wilden Süden

Re: Configure SSL certificatite with Powershell script

Beitrag von Martin »

Yes, the call

Code: Alles auswählen

"C:\Program Files\AxoNet Software GmbH\LightsOut3\LightsOut2.Server.SSL.exe" -update
was buggy.

Starting with the upcoming 3.0.2, Lights-Out will call this update automatically to ensure that the certs are up-to-date.

Regards
Martin
Essentials 2016 unter Windows Server 2022 auf HP Microserver Gen 8.
Entwickler von Lights-Out
Masahiko
Foren-Einsteiger
Beiträge: 6
Registriert: 12. Aug 2017, 01:43

Re: Configure SSL certificatite with Powershell script

Beitrag von Masahiko »

Hi, Martin.

That's a nice news for me.
I appreciate you support.

Masaihko
Masahiko
Foren-Einsteiger
Beiträge: 6
Registriert: 12. Aug 2017, 01:43

Re: Configure SSL certificatite with Powershell script

Beitrag von Masahiko »

Hi, all.

I finally successed to configure certification with powershell.

Code: Alles auswählen

netsh http add sslcert ipport=0.0.0.0:7784 certhash=<new cert hash> appid={12345678-db90-4b66-8b01-88f7af2e36bf}
Antworten