zettelkasten/OneNoteExport/Kommunikationstechnologie/Sharepoint/Alt Installationen/07_SSL Umstellung.md
Ralf Koop 5a108aa2b4 .
2023-08-25 23:29:11 +02:00

1.6 KiB

SSL Umstellung

Mittwoch, 20. Juni 2018

13:19

 

Import-Module IISAdministration

 

 

$iisSite = "MySite"

$hostname = "mysites-spt.bkk-mobiloil.de"

 

New-WebBinding -name $iisSite -Protocol https -HostHeader $hostname -Port 443 -SslFlags 1

 

Aus <https://weblog.west-wind.com/posts/2016/Jun/23/Use-Powershell-to-bind-SSL-Certificates-to-an-IIS-Host-Header-Site>

request Zertifikat :

 

mmc mit Zertifikaten öffnen.

Im Computer private Store auf request Zertifikat:

 

AD Enrollment Policy

 

 

WebServer windows 2012

Details -Probertys

 

Common Name eintragen

 

Alternate Names mit DNS eintragen. Dort auch noch mal Common Name eintragen.

 

Passwort für den Export :

Sharepoint2016!

 

 

 

$cert = (Get-ChildItem cert:\LocalMachine\My | where-object { $_.Subject -like "*bkksptweb*" } | Select-Object -First 1).Thumbprint

 

Aus <https://weblog.west-wind.com/posts/2016/Jun/23/Use-Powershell-to-bind-SSL-Certificates-to-an-IIS-Host-Header-Site>

 

New-WebBinding -Name "Portal Home" -IPAddress "*" -HostHeader "portal-spt.bkk-mobiloil.de" -Port 443 -Protocol https -SslFlags 1

 

 

get-item -Path "cert:\localmachine\my\$cert"

 

Aus <https://blogs.msdn.microsoft.com/webapps/2018/03/23/binding-a-certificate-in-iis-using-c-and-powershell/>

 

 

 

get-item -Path "cert:\localmachine\my\$cert"| new-item -path IIS:\SslBindings\0.0.0.0:443:portal-spt.bkk-mobiloil.de -Value $cert -Force

 

Aus <https://blogs.msdn.microsoft.com/webapps/2018/03/23/binding-a-certificate-in-iis-using-c-and-powershell/>