Soft deleted mailboxes will be available for 30 days. If the mailbox available in soft deleted state then we can restore the mailbox.
We can view whether the mailbox is in soft deleted state using the below command
Get-Mailbox UserID –Softdeleted
If it is available as a soft deleted mailbox, then we can run the below command to restore the mailbox.
New-MailboxRestoreRequest -SourceMailbox <GUID from above step> -TargetMailbox <GUID from new target mailbox you’ve created>
Wait for the restore to happen in the backend. To check the restore request status, you can run the below command
Get-MailboxRestoreRequest –Identity MailboxRestoreRequest1
Exchange Online made the soft deleted mailbox very simple. You can follow the above steps to restore a soft deleted mailbox.