From 17af5d89621b903d34b432125c90049a656ebc74 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Apr 2026 05:47:37 -0700 Subject: [PATCH] befhel ladap5 --- befehl.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/befehl.txt b/befehl.txt index 052ee43..c93dd36 100644 --- a/befehl.txt +++ b/befehl.txt @@ -26,4 +26,24 @@ gpresult /r /scope:computer | Select-String -Pattern "LDAP|ldap" # 4. Nach GPO-Aenderung: gpupdate /force -Restart-Service NTDS -Force \ No newline at end of file +Restart-Service NTDS -Force + + + + + +# Selbst-signiertes Zertifikat fuer LDAPS erstellen +$cert = New-SelfSignedCertificate ` + -DnsName "SRV-DC01.byte.trail","byte.trail","10.10.10.10" ` + -CertStoreLocation "Cert:\LocalMachine\My" ` + -KeySpec KeyExchange ` + -KeyLength 2048 ` + -KeyExportPolicy Exportable ` + -NotAfter (Get-Date).AddYears(10) ` + -Provider "Microsoft RSA SChannel Cryptographic Provider" + +# AD erkennt Zertifikate im Personal Store automatisch und aktiviert LDAPS (Port 636) +Restart-Service NTDS -Force + +# Pruefen ob Port 636 jetzt lauscht: +Test-NetConnection -ComputerName localhost -Port 636 \ No newline at end of file