- Log and revoke system access and permissions
- Hand over data to manager and/or other owners
- Delete all other data (mail, home folders, etc)
- Cancel meetings (and/or transfer them to other responsible organizers)
Powershell to the rescure:
# Define email to search for # Requirements # Connection to Exchange (online) using Powershell # Administrator account with "Mailbox Import Export" role in Exchange (online) # Task flow # Lookup primary email address for user # Search meetingrooms for meetings (if needed) # Delete meetings from meetingrooms (backup if needed) #Search in Powershell (output in console) get-mailbox -recipienttype roommailbox | search-Mailbox -SearchQuery 'From:user@domain.com AND kind:meetings' -EstimateResultOnly -Verbose | ft identity,success,resultitemscount #Search in Powershell (output to targetmailbox) get-mailbox -recipienttype roommailbox | foreach { search-Mailbox $_.alias -SearchQuery 'From:user@domain.com AND kind:meetings' -Verbose -TargetMailbox Administrator -TargetFolder "SearchAndDeleteLog" -LogOnly -LogLevel Full } #Delete get-mailbox -recipienttype roommailbox | search-Mailbox -SearchQuery 'From:user@domain.com AND kind:meetings' -DeleteContent -Force -Verbose #Delete (with moving messages) - enter correct targetmailbox and folder get-mailbox -recipienttype roommailbox | foreach { search-Mailbox $_.alias -SearchQuery 'From:user@domain.com AND kind:meetings' -DeleteContent -Force -Verbose -TargetMailbox Administrator -TargetFolder "BackupFolder" -loglevel Full }
No comments:
Post a Comment