Powershell creating an received email as a .msg file
03:15 02 Jun 2026

Ther are ways to create a .msg file by calling Application.Outlook from Powershell:
How to create a MSG file with CC with PowerShell?

But those examples are for sending emails.

Instead, I have the email headers and body from a REST API, I want to save them as a .msg file. Following the examples, I can construct the MailItem, but MailItem's ReceivedTime is read-only.

Is there a way to construct an received email?

powershell outlook