2025-11-26

PowerShell 更新 IIS Site Bind SSL Cert

$PublishedURL = "www.contoso.com"
$IISSiteName = "www.contoso.com"

$PFXPath = "C:\Cert\Cert\"
$Password = "password"

$PFXFullPath = "$PFXPath$PublishedURL.pfx"

$pfx = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$pfx.Import($PFXFullPath, $Password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::EphemeralKeySet)

Import-Module IISAdministration

2025-11-20

在 Exchange Online 如果寄給某個外部網域的信件無法送達,不要退信給原寄件者

在 Exchange Online 如果寄給某個外部網域的信件無法送達,不要退信給原寄件者
方法是透過 Remote Domain 設定停用 NDR(Non-Delivery Report)

首先要建立 Remote Domain (在 EAC Mail flow -> Accepted domains)
New-RemoteDomain -Name "DomainNameOne" -DomainName "Domain.Name.One"
New-RemoteDomain -Name "DomainNameTwo" -DomainName "Domain.Name.Two"

停用 NDR必須用 PowerShell 指令,EAC 不支援 (這裡的 -Identity 是上面的 -Name)

Set-RemoteDomain -Identity "DomainNameOne" -NDREnabled $false
Set-RemoteDomain -Identity "DomainNameTwo" -NDREnabled $false