Saturday, July 28, 2018
Restore Softdeleted O365 Mail box
Restore Softdeleted O365 Mail box
In this Blog we will see how to Restore an Soft Deleted Mail box in O365
Connect to Office 365 using below powershell commands
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Command To List all the Soft Deleted Mailboxs.
Get-Mailbox -SoftDeletedMailbox | Select DisplayName,ExchangeGuid,PrimarySmtpAddress,ArchiveStatus,DistinguishedName
Below command to export all the Soft Deleted mail boxes to an Excel
Get-Mailbox -SoftDeletedMailbox | Select DisplayName,ExchangeGuid,PrimarySmtpAddress,ArchiveStatus,DistinguishedName | Export-Csv c:Softdeleted.csv
From the above command identify the mail box which we are trying to restore and copy the ExchangeGUID
$SoftMailbox = Get-Mailbox -SoftDeletedMailbox <Exchagne GUID>
Mail Box Move request
New-MailboxRestoreRequest -SourceMailbox $SoftMailbox.DistinguishedName -TargetMailbox <Enter Traget mailbox where to restore mail@contoso.com> �AllowLegacyDNMismatch
To check the Restore Progress
Get-MailboxRestoreRequest -Identity mail@contoso.com
To get the progress in Percentage Complete
Get-MailboxRestoreRequestStatistics -Identity mail@contoso.com
Hope this help any one trying to restore Softdeleted mailboxes
Connect to Office 365 using below powershell commands
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Command To List all the Soft Deleted Mailboxs.
Get-Mailbox -SoftDeletedMailbox | Select DisplayName,ExchangeGuid,PrimarySmtpAddress,ArchiveStatus,DistinguishedName
Below command to export all the Soft Deleted mail boxes to an Excel
Get-Mailbox -SoftDeletedMailbox | Select DisplayName,ExchangeGuid,PrimarySmtpAddress,ArchiveStatus,DistinguishedName | Export-Csv c:Softdeleted.csv
From the above command identify the mail box which we are trying to restore and copy the ExchangeGUID
$SoftMailbox = Get-Mailbox -SoftDeletedMailbox <Exchagne GUID>
Mail Box Move request
New-MailboxRestoreRequest -SourceMailbox $SoftMailbox.DistinguishedName -TargetMailbox <Enter Traget mailbox where to restore mail@contoso.com> �AllowLegacyDNMismatch
To check the Restore Progress
Get-MailboxRestoreRequest -Identity mail@contoso.com
To get the progress in Percentage Complete
Get-MailboxRestoreRequestStatistics -Identity mail@contoso.com
Hope this help any one trying to restore Softdeleted mailboxes