# Restore deleted resource ## Find mailbox ID `Get-MailboxDatabase | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {($_.DisplayName -eq "Room 01.03") -and ($_.DisconnectReason -eq "SoftDeleted" -or "Disabled")} | Format-List DisplayName,DisconnectReason,DisconnectDate,MailboxGuid` ## Create new resource, then restore: `New-MailboxRestoreRequest -SourceStoreMailbox 369c6ce9-301d-41af-b4cf-cca87d679756 -SourceDatabase MailDB07 -TargetMailbox MULRaumG6.03.410 -AllowLegacyDNMismatch` # give group permission on mailbox "finance1" `add-mailboxpermission -Identity finance1 -user CONTOSO\Accounting -AccessRights 'FullAccess'` # set external mail address `Enable-MailUser -Identity FreemanG -ExternalEmailAddress gordon.freeman@contoso.com` # add access to calendar `Add-MailboxFolderPermission -Identity Maintenance@contoso.com:\Calendar -User gordon.freeman@contoso.com -AccessRights Editor` # get mailbox folder statistics `Get-MailboxFolderStatistics gemma.odena@auma.com | Select Name,FolderSize,ItemsinFolder`