Get All AIP encrypted files - SharePoint Online

One of the recent project merger and acquisition.  Technology - M365 tenant to Tenant migration Areas of consolidation 1. Mailboxes  2. SharePoint online data 3. OneDrive for Business data 4. Teams data migration 5. Security and Compliance Migration  Area of concern from security and compliance side was the encrypted files within EXO, SPO, Teams, ODB. Issue with encrypted data migration - end users will not be able to access the documents once the Source tenant is decommissioned.   Solution available -  Ask end users to unencrypt the data before migration  Alternet Solution - 1. Decrypt the files, mails using eDiscovery - This will give us output in PST format will is available for offline access, but the data in source will still be encrypted.  Decryption in eDiscovery - Microsoft Purview (compliance) | Microsoft Docs   2. Use Get-AIPfileLabel and Get-AIPFileLabel but in order to use this you must be aware of all the files paths.  Challenges -  1. We do not want end user intervention

Restore deleted user data to new mailbox




Connect PowerShell to Exchange Online using below command:
  • $LiveCred = Get-Credential
  • $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection
  • Import-PSSession $Session
Then checked the old user in Soft Delete
  • Get-Mailbox –SoftDeletedMailbox  //Check the deleted user details
  • Get-mailbox –SoftDeletedMailbox –Identity “Name of the mailbox” | fl *guid*
  • Copy the GUID (not Exchange GUID) in a notepad (1)
  • Get-mailbox –Identity “Email address of the new user” | fl *guid*
  • Copy the GUID (2)
Following command will copy the old mailbox’s email to the new mailbox.
  • New-MailboxRestoreRequest -SourceMailbox "GUID (1)" -TargetMailbox "GUID (2)" -TargetRootFolder "Old Mailbox" –AllowLegacyDNMismatch
Since user had Archive enabled we restored the archive mailbox seperately
We ran the below commands to get the ArchiveGuid
Get-Mailbox -Identity user@domain.com -SoftDeletedMailbox |fl " ArchiveGuid"
Get-Mailbox -Identity user@domain.com |fl "ArchiveGuid"


  • New-MailboxRestoreRequest -SourceMailbox "GUID (1)" -TargetMailbox "GUID (2)" -TargetRootFolder "Old Mailbox" –AllowLegacyDNMismatch

Comments

  1. It's help me...Thank you very much!

    ReplyDelete
  2. Oh my god....I spent 3 hours with MS Engineer with not results! Here, 5 minute....Thank you so much.

    ReplyDelete
  3. Microsoft documentation states to use ExchangeGuid. You state to use Guid. Have you done this with both or just Guid?

    ReplyDelete

Post a Comment

Popular posts from this blog

Error - AttributeValueMustBeUnique in Azure AD connect sync

Error - QuarantinedAttributeValueMustBeUnique

Add members to office 365 Security Group Using PowerShell and CSV

Enforce MFA using CSV

Analyze Office 365 Message headers