What are the prerequisites for writing files via the `New-MailboxExportRequest` method in ProxyShell?
Before using `New-MailboxExportRequest` to write files, you must add the target user to the role group `Mailbox Import Export` using `New-ManagementRoleAssignment`. The payload must be delivered via email—either from an external mailbox or by exploiting CVE-2021-34473 to impersonate a mailbox user, optionally creating a hidden folder for stealth. The export command then uses a `-ContentFilter` to extract only emails containing the payload, writing the file to a path like `\127.0.0.1\c$\inetpub\wwwroot\aspnet_client\test.aspx`. After writing, clear export requests to avoid leaving traces.
New-MailboxExportRequestMailbox Import Exportpayload deliveryCVE-2021-34473hidden folderfile writeProxyShell