Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send. while using PowerShell

  If you have gotten the “Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.” error while using PowerShell then add the line below to your script.     ​[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 PowerShell calls uses TLS 1.0 for web requests by default. However, Exchange is expecting a higher level of TLS, so…


The problem with modifying the iterating object in a “foreach”

Matt Stehle used to be on my team prior and had blogged on the usage of Outlook Object Model (OOM) under .NET. However, his blog is being closed and I am re-blogging his content here. Ahhh “foreach”. Usage of foreach can be either a blessing or a curse. Unfortunately, a lot of developers don’t understand…


OOM.NET – Outlook Crashes When Using Outlook Object Model in Multiple Threads

Matt Stehle used to be on my team prior and had blogged on the usage of Outlook Object Model (OOM) under .NET. However, his blog is being closed and I am re-blogging his content here. One of the major requirements most developers are up against these days is ensuring their code runs as fast as…


OOM.NET – Like a good standup comic – use scope and have good timing…

Matt Stehle used to be on my team prior and had blogged on the usage of Outlook Object Model (OOM) under .NET. However, his blog is being closed and I am re-blogging his content here. Recently, I was helping someone with a Outlook item leak type issue involving a Task FormRegion.  The symptom was that…


OOM.NET Part 4 – Don’t Thread On Me

Matt Stehle used to be on my team prior and had blogged on the usage of Outlook Object Model (OOM) under .NET. However, his blog is being closed and I am re-blogging his content here. Patrick posted a discussion of multithreading with Outlook Object Model and why it doesn’t help to make OOM calls on…


Part 3 – Back to the Basics, MSDN Must Reads

Matt Stehle used to be on my team prior and had blogged on the usage of Outlook Object Model (OOM) under .NET. However, his blog is being closed and I am re-blogging his content here. The Outlook Developer Reference on MSDN has great information on .NET and COM interop which I would consider a prerequisite…


OOM.NET Part 2 – Outlook Item Leaks

Matt Stehle used to be on my team prior and had blogged on the usage of Outlook Object Model (OOM) under .NET. However, his blog is being closed and I am re-blogging his content here. Outlook item leaks are the most common OOM with .NET issues that we see and I’ve debugged enough of them…


OOM.NET Part 1 – Introduction and Why Events Stop Firing…

Matt Stehle used to be on my team prior and had blogged on the usage of Outlook Object Model (OOM) under .NET. However, his blog is being closed and I am re-blogging his content here. OOM.NET is not a special API set that was created in managed code.  It is the name I’ve given to…


Breaking change to on-premises EWS Push Notifications

There is a change being introduced to on-premises Exchange servers 2010, 2013, 2016 and 2019 through cumulative updates which will break existing EWS Push applications which authenticate the notifications sent from Exchange to the listening client. Every developer and programmer who works with a program that uses EWS Push needs to read the article below…