Exchange 20xx - Zertifikat importieren und an Dienste anhängen:

 

# Import Exchange Moduls
Add-PSSnapin *exchange*

# Definition der Variablen zur Verarbeitung
$CertPath = "C:\001-Install\Certificate.pfx"
$CertPassword = "Password1234567"
$CertFriendlyName = "Anzeigename des Zertifikates"
$Services = "IIS,SMTP,IMAP"

# Import des Zertifikates
$Cert = Import-PfxCertificate -FilePath $CertPath -CertStoreLocation Cert:\LocalMachine\My -Password (ConvertTo-SecureString -String $certPassword -AsPlainText -Force)

# Zuordnung der Dienste
Enable-ExchangeCertificate -Thumbprint $cert.Thumbprint -Services $services

Write-Host "Zertifikat erfolgreich importiert"

#Prüfung:
Get-ExchangeCertificate | fl Thumbprint,Services,Subject

© 2025 ziggymania.de Designed S.Wommer