r/exchangeserver • • 4h ago

Article Exchange Certificate Swap PowerShell - Github

16 Upvotes

https://github.com/LoneRiderOH/exchange-cert-swap.git

I hope guys/girls this will make you job easier.

A single-file PowerShell WPF GUI for replacing the public IIS/SMTP certificate on on-premises Exchange Server 2016, 2019 and Subscription Edition mailbox servers, using a PFX file or a free certificate from Let's Encrypt, ZeroSSL, Google Trust Services, SSL.com or Actalis. It covers the whole process: inventory, validation, import, enable, verification and safe removal of the old certificate. Dry run is on by default.

Features

  • Free certificates (optional): requests a certificate from Let's Encrypt, ZeroSSL, Google Trust Services, SSL.com or Actalis using the Posh-ACME module, and passes the resulting PFX straight to validation. Proof of domain ownership, chosen per request:

    • HTTP-01: the tool writes the challenge file into IIS on every selected server, so it works behind a load balancer. It checks that each server serves the file before the CA is asked to validate.
    • DNS-01 manual: the tool shows the _acme-challenge TXT records to create, then checks public DNS before continuing. Supports wildcards.
    • DNS-01 automatic via Cloudflare: built-in option for domains hosted on Cloudflare DNS. You paste a scoped API token, and the tool tests it, creates and removes the TXT records itself, and can remember the token, encrypted for your Windows user. It also detects when your names are on Cloudflare DNS.
    • DNS-01 automatic via other DNS hosts: uses any of Posh-ACME's ~90 DNS provider plugins (Route 53, Azure DNS, GoDaddy and more).
  • Inventory: lists every Exchange certificate on all selected mailbox servers and marks the Auth (OAuth) and internal transport certificates.
  • Validation before changes (read-only):

    • the PFX contains a private key, is in its validity period and has the Server Authentication EKU
    • the chain builds to a trusted root
    • every InternalUrl/ExternalUrl on the OWA, ECP, EWS, OAB, ActiveSync and MAPI virtual directories, plus the Autodiscover SCP, is covered by the certificate's SANs (wildcards are handled correctly)
    • lists Send and Receive connectors whose TlsCertificateName still points to the old certificate
  • Import to multiple servers: imports the same PFX on every selected server with Import-ExchangeCertificate -FileData, so the tool doesn't need to be run on each server.
  • SMTP connectors: updates Send and Receive connectors whose TlsCertificateName points to the old certificate, such as the hybrid Outbound to Office 365 and Default Frontend connectors set by the HCW. It can also pin the new certificate on the Default Frontend connector (port 25), so internet senders get the public certificate on STARTTLS instead of the self-signed one. The connector FQDN is never changed, and rollback commands are logged.
  • Enable for IIS and SMTP: if Enable-ExchangeCertificate -Force replaces the internal transport certificate, the tool restores the previous one unless you choose otherwise.
  • Verification on the network: opens a real TLS connection to each server on port 443 and compares the served thumbprint with the new certificate. It also checks SMTP port 25 with STARTTLS (for information only) and any extra endpoints you list, such as a load balancer or public name.
  • Safe removal of the old certificate: a certificate is removed only if: You confirm each removal.

    • its server passed verification
    • it is not the Auth or internal transport certificate
    • it is no longer bound to IIS
    • no connector points to it
  • Dry run by default: every command is logged instead of being run. You turn Dry run off on purpose, and the header switches to red LIVE MODE.
  • Full log: each run writes logs\CertSwap_<timestamp>.log next to the script. PFX passwords are never logged.
  • No private key is written to the machine that runs the tool: the PFX is opened with EphemeralKeySet, so its key stays in memory. It never goes into a Windows key store or onto a smart card or hardware token. The key is installed only on the Exchange servers, through Import-ExchangeCertificate.

r/exchangeserver • • 10h ago

Question What do you use for automated certificate deployment in Exchange?

15 Upvotes

We operate in a hybid environment with 365, running Exhange SE on-prem. Now that public CA's have begun shortening the validity periods of their certs, which will eventually be down to 47 days by the time 2029 rolls around, we need something better than what we've been doing which is pretty much just manual renewal since it used to only be done once a year.

We've had Sectigo's cert manager product for a while and though I haven't actively used it much it wouldn't take me long to get more familiar with it. A colleague of mine whom I work closely with has used it more often so it wouldn't be an issue to work him to see what we can do. We've already automated specific named certs for different apps and websites using this product, primarily on IIS.

Here's what our current manual process looks like:

  • Within the Exchange console, select the cert in use and select renew and step through the menu until it spits out a request file.
  • Send request file, receive cert. Select the complete request option in Exchange console, and then have to ensure that it selects the new cert as the 'active' one to be using (it usually prompts for this overwriting action), and then also have to manually select associate the new cert with IIS on the Exchange server.
  • I then run a Exchange shell command to update the TLS connectors with the new cert which I have to change the thumbprint for it to know which cert I'm talking about.
  • Lastly once all of that is done I run through the HCW to select the new cert here.

I don't think I can remove any of these steps, but I'm sure I'm not the only one in this position. What are some of you doing for automated deployment?


r/exchangeserver • • 13h ago

How to provide email business continuity when primary mail server (Exchange Online) outage occurs? (In relation to MO1550821)

Thumbnail reddit.com
0 Upvotes

r/exchangeserver • • 3d ago

Question OWA gets hit with password spray every night and I only see it in the morning lockouts.

21 Upvotes

We run our own Exchange 2019 server with OWA open for a few staff who work remotely, and I'm the one who ends up looking after it. Most mornings there's a handful of locked accounts and a wall of 4625s on the server. Moving everyone onto a VPN is the proper fix and it's on the list, but until that's sorted I'd like to know about a spray while it's actually happening.

What are you alerting on for OWA, and where do those events end up for you?


r/exchangeserver • • 3d ago

Exchange SE & 2019 Coexistence: Can a client buy only 300 SE CALs for a 700-mailbox org?

0 Upvotes

Hi everyone, looking for clarification on Microsoft licensing rules for an upcoming project.

  • 700 total mailboxes on-premises running on Exchange Server 2019 (perpetual licenses, likely no active Software Assurance).
  • Active Exchange Hybrid setup in place (likely for EOP), though all 700 mailboxes sit strictly on-premise.

The Plan:

  • Add a new Exchange Server Subscription Edition (SE) server into the existing Exchange organization.
  • Migrate 300 mailboxes to Exchange SE and leave the remaining 400 mailboxes on Exchange 2019 for now.
  • No mailboxes are moving to Exchange Online.
  • The client plans to purchase the Exchange SE server license plus only 300 SE CALs, assuming the other 400 users remain covered by their existing Exchange 2019 CALs.

What I want to know:

  1. Is this licensing split valid, or does introducing Exchange SE into the organization require all 700 users to have Exchange SE CALs (or active Software Assurance)?
  2. Does the existing Hybrid configuration affect the CAL requirements for the 300 users remaining on Exchange 2019?

Thanks in advance for any help or links to the official licensing documentation.


r/exchangeserver • • 3d ago

Question Resolve split brained hybrid user?

2 Upvotes

Trying to figure out how this happened.

I assume a license was assigned before the mailbox migration happened.

I found this documentation on how to recover. https://learn.microsoft.com/en-us/troubleshoot/exchange/user-and-shared-mailboxes/mailbox-exists-exo-onpremises

It shows steps, but how do we verify which mailbox the user is actually using so we don’t delete the wrong one?

How do we verify that we enter the correct RemoteRoutingAddress so that will work and match other users?

Step 5 says restore custom proxy addresses and other Exchange Server attributes. How can I find what’s needed and the steps to do that?

Is there are more clean and simple way to do this other than the steps shown in the link above?


r/exchangeserver • • 4d ago

Looking for a Barracuda email security alternative

4 Upvotes

Our Barracuda renewal is due in January and I’m leaning towards not signing again. We’re around 300 users on 365 business premium with me and a part timer running everything. It’s email gateway defense, the cloud one, so the appliance RCE going around isn’t us.

A recent incident kinda pushed me where one of our suppliers had their mailbox taken over and whoever was in it replied on a invoice thread asking AP to update the bank details. There was no link or attachment and it came from their real address and it passed SPF and DKIM, barracuda just delivered it like any other email. AP only caught it cause the new account was overseas and they rang the supplier on the number they had.

The rest is the usual stuff like legit mail sits in quarantine most days and I lose a couple hours a week releasing it, to be fair some of that is on me since I’ve been allowlisting whole domains to make the complaints stop. I’m cleaning that up either way.

We already have defender P1 through business premium and check point keeps coming up in older threads here. What did you move to when you dropped barracuda?


r/exchangeserver • • 4d ago

Article Teams traffic moved onto the Exchange Online gateway set off the bug behind the 20-hour M365 outage

Thumbnail leaddev.com
1 Upvotes

r/exchangeserver • • 5d ago

Question Orphaned exchange server.

Thumbnail reddit.com
0 Upvotes

r/exchangeserver • • 8d ago

Claiming SLA credit for the Exchange Online outage - What Microsoft needs and a Script to collect it

83 Upvotes

Microsoft won’t apply the credit automatically, and claims without enough detail get rejected. You need the incident IDs, your tenant ID, the affected users per location, and a written summary of the impact.

The article has a PowerShell script that collects all of that from Graph, downloads the PIR once it’s out, and writes a claim summary you can paste into the request. It also covers filing through a CSP partner.

https://lazyadmin.nl/office-365/claim-microsoft-365-sla-credit/


r/exchangeserver • • 8d ago

Question After Outage Strategy?

Thumbnail reddit.com
0 Upvotes

r/exchangeserver • • 8d ago

Anyone else still running on-prem Exchange and feeling pretty good about that decision today?

Thumbnail reddit.com
37 Upvotes

r/exchangeserver • • 9d ago

MS KB / Update Mail to Microsoft during the EX1550543 outage was deferred, not rejected: retry windows by sender, and what happened to Microsoft's DMARC reports

12 Upvotes

I run a DMARC monitoring service, and I spent the outage reading Microsoft's bulletins next to the status pages of the big sending services. Here is what is useful if you are cleaning up after it.

The replies were temporary

SparkPost published three of the replies its systems were getting from Microsoft from about 17:30 UTC on 12 Nov:

451 4.7.0 Temporary server error
421 4.3.2 The maximum number of concurrent server connections has exceeded a limit
451 4.7.700 PFA agent busy

All 4xx. SparkPost's wording was "the errors include", so there may be others. I found no Microsoft documentation that explains them for this case, and none that mentions "PFA", so I won't guess.

What that means in practice

  • If your sender queues and retries (everything in the next bullet does), don't resend anything that hasn't bounced. You will send duplicates.
  • What decides whether a message is lost is your sender's retry window. Documented defaults, read on 13 Nov 2026: Mailgun 8 hours, Postmark 12, Resend 14, Exchange Online 24, Brevo 36, Exchange Server 2 days, SendGrid 72 hours, Exim 4 days, Postfix 5 days.
  • Anything time-bound (one-time passcodes, reset links) should be reissued, not resent.
  • If your platform suppresses addresses after a bounce, check whether Microsoft-hosted addresses were added because a message expired.
  • There is no reason to touch SPF, DKIM or DMARC.

On Postfix, grep status=expired in the mail logs shows what gave up. With the default 5-day queue lifetime it should print nothing.

Microsoft's 48-hour statement

On 13 Nov at 09:03 UTC Microsoft said it is "extending the email timeout window to 48 hours to help protect delayed messages". It does not define that window. My reading is that it covers mail held inside Exchange Online, whose documented retry period is 24 hours. It can't lengthen the queue on anyone else's sending system.

The part I did not expect

Microsoft 365's DMARC aggregate reports normally start reaching us between 01:03 and 01:11 UTC every day. On 13 Nov the first one arrived at 07:09 UTC, about six hours late, and the rest had not arrived when I last looked (08:57 UTC). Reports from other providers kept arriving, and the receiving mailbox runs on our own mail servers. I can only say what we received, and I can't show that the outage caused it.

If your DMARC dashboard shows a hole from Microsoft around these days, check your sending logs before you read it as lost mail.

Happy to answer questions on any of it. Full write-up with the timeline, the retry table with vendor links and the sources:

https://dmarcguard.io/blog/microsoft-outage-ex1550543-email-deferred/


r/exchangeserver • • 9d ago

Migrating mailboxes back to on prem when Exchange online is down

0 Upvotes

We aren't there yet. But how would we go about doing this? I expect there is no clean/official way of doing this, and it will be a pain to re-sync emails later.


r/exchangeserver • • 9d ago

I'm a journalist trying to email people for quotes about the Exchange outage. You can see the problem.

10 Upvotes

I'm Rob Scott from UC Today, and I'm writing about the Exchange Online outage. Normally I'd email a few admins and ask what their last 18 hours looked like. My Outlook has other plans, so I'm stuck here like it's 2009 and the fax machine is down too.

If you're running Exchange or M365 for a living and you're happy to be quoted (named, or by job title only), reply below or DM me. I'm mostly after the stuff Microsoft's service health page doesn't say.

  1. Did Microsoft's updates actually help you, or did you find out more from Reddit and Downdetector?
  2. If calendars and mail can disappear for most of a working day, is "cloud first" still a strategy or just a habit?
  3. Has this outage changed anyone's mind about keeping some on prem Exchange around, or is that a fantasy nobody would budget for?

I'll reply to everyone, as long as it's not by email.


r/exchangeserver • • 9d ago

Exchange Online has been degraded since 16:17 GMT Thursday, and Microsoft still has no ETA

12 Upvotes

The recovery is the part that worries me. Exchange going down is bad enough. Watching the fix fail to hold is worse.

Microsoft opened EX1550543 at 16:17 GMT on Thursday after people couldn't reach Outlook mailboxes in the browser or the desktop and mobile apps. A broader Microsoft 365 incident, MO1550821, followed at 18:26 GMT. As of 05:01 GMT on Friday there was still no estimated time for recovery, and the official root cause was still listed as N/A.

Microsoft said the elevated load was not coming from more traffic. A large number of servers failed automated health checks and dropped out, which shifted load onto the ones left. It later said a process that sets up secure connections "becomes overwhelmed, causing the servers to stop processing requests," and it began reverting "a recent network configuration change that correlates with the start of impact."

Servers brought back online became unresponsive again once traffic returned. At 04:10 GMT on Friday Microsoft reported partial recovery in some regions, then said those actions were "not resulting in sustained recovery." The 05:01 GMT update described machines "stuck in a bad state," blocking a force-sync of the network change, and said it was scaling up virtual machines.

Charles Lamanna said at 03:37 GMT there is no indication this is the result of malicious or cyber activity. The service health notes say the same.

We've had shorter Exchange scares before. In November 2024 a change in Exchange Online took down Teams calendar and Outlook for a Monday morning. This one ran through the night, and a lot more of the suite now depends on Exchange being up.


r/exchangeserver • • 9d ago

Office 364

Post image
55 Upvotes

r/exchangeserver • • 9d ago

[OFFICIAL STATEMENT] Regarding Today’s Microsoft 365 Infrastructure "Incident"

Thumbnail reddit.com
0 Upvotes

r/exchangeserver • • 9d ago

Outlook mobile app syncs through cloud even with on prem servers

7 Upvotes

Reposting because I did not give enough details and some people were assuming I was talking about the desktop application.

Everyone else probably knows this but I just found out today that the official MS Outlook mobile app uses outlook.com as a middle man to send and receive email from on prem exchange servers.

https://learn.microsoft.com/en-us/exchange/clients/outlook-for-ios-and-android/use-basic-auth

The Exchange ActiveSync (EAS) connection between Exchange Online and the on-premises environment enables synchronization of the users' on-premises data and includes four weeks of email, all calendar data, all contact data, and out-of-office status.

One of the whole reasons for staying on prem was to not be reliant on M365. So now with this outage my users are unable to send and receive email on their phones even though we're 100% on prem.

I also didn't want my email, contacts, and calendar sitting on microsoft's servers so that's just another frustrating part of this revelation.

I'm sure it's somewhere in the fine print in the mobile app but it just pushes me more and more to ditching exchange completely.


r/exchangeserver • • 9d ago

Exchange Online and Barracuda Email Gateway Defense

1 Upvotes

Hey peeps. Looking for some advice.

We use Exchange Online with Barracuda Email Gateway Defense in front. So, both inbound and outbound emails flow through Barracuda's smarthost. In Exchange, we have a mail flow that sets the Spam Confidence Level (SCL) to -1 on all inbound emails from the Barracuda connector. This was Barracuda's previous implementation guidance to ensure that emails processed by EGD were delivered. Accordingly, we manage email almost entirely through Barracuda EGD. Sender authentication (spf, dkim, dmarc) and TLS is enforced in Barracuda. We also use EGD's sender and content policies.

These days, Microsoft and Barracuda recommend migrating to Enhanced Filtering for Connectors instead of using the mail flow rule that sets SCL-1.

My question is--for those who have made this change--where do you primarily manage email traffic? Currently, we have a process wherein we review emails blocked by sender authentication failures on a daily basis. Sometimes we have to whitelist senders or domains that can't get their acts together in terms of spf, dkim, and dmarc. We've tried to stop granting these exceptions. But the business won't have it. So, it is what it is.We do all of this in Barracuda.

If Exchange Online Protection is brought into the mix and processes emails separately once they pass through Barracuda, we're concerned by the additional administrative burden of having to whitelist, blocklist, or otherwise adjust settings in two places instead of one.


r/exchangeserver • • 9d ago

SER cloud connector or PPS option (OnPrem SMTP Relay)

Thumbnail reddit.com
2 Upvotes

r/exchangeserver • • 10d ago

Exchange 2019 without ESU/SE: mitigation M2.1.0 (CVE-2026-42897) breaks inline images in OWA – workaround

13 Upvotes

This is meant for Exchange 2019 servers that can’t get the official fix (no ESU / Exchange SE subscription) and rely on the EEMS mitigation. If you can install the official security update, do that instead.

After applying the Exchange Server mitigation M2.1.0 for CVE-2026-42897, inline images in emails no longer display in OWA.

I found a workaround that brings them back:

  1. On the Exchange server, open IIS Manager.
  2. Go to Sites → Default Web Site → owa → URL Rewrite.
  3. Double-click the outbound rule “EEMS 2.1 OWA CSP - outbound”.
  4. Under Action Properties → Value, replace:
   {R:1}; script-src-attr 'none'

with:

   {R:1}; script-src-attr 'unsafe-hashes' 'sha256-k5Rg6SbZboRTbYorWlg/UbO7Ar4vGBdxaNl/VqCbUQU='
  1. Apply. You don’t need to restart IIS. Just refresh the OWA page and inline images should show up again.

Does this look reasonable to you? Any feedback is welcome.

The long explanation

M2.1.0 adds a Content-Security-Policy header with script-src-attr 'none' to every response served under /owa. That directive blocks all JavaScript inside HTML attributes, which includes inline event handlers like onload, onclick and so on.

The problem is that OWA’s inline image viewer relies on exactly that. Inline images are rendered with an <img> tag like this:

<img originalsrc="cid:part1.ugJcNZY4.piZc1QHZ@mydomain.com"
     onload="InlineImageLoader.GetLoader().Load(this)"
     data-custom="....." naturalheight="691" naturalwidth="864"
     src="data:image/gif;base64,..." alt=""
     style="max-width: 864px; max-height: 691px; width: 100%;"
     crossorigin="anonymous">

The src is only a placeholder GIF. The real image is loaded by the onload handler. With the CSP in place, InlineImageLoader.GetLoader().Load(this) is never executed, so the image never appears.

The modified policy, script-src-attr 'unsafe-hashes' 'sha256-…', allows only that exact handler string (its SHA-256 hash matches InlineImageLoader.GetLoader().Load(this)). Every other inline attribute script is still blocked, so the protection from the mitigation should stay mostly intact.

Caveat: if EEMS reapplies or updates the mitigation, this change will probably be overwritten, and you’ll need to apply it again.


r/exchangeserver • • 10d ago

Question CLIUSR Certificates - 1 is valid and 1 is not..

3 Upvotes

Hi,

I have 2 CLIUSR certs on all 4 of my exchange servers, 1 expired a few days ago and the other 1 is still valid.

No issues or anything, is it safe just to delete the one that's invalid?

I was hoping they would just delete themselves