{"id":1621,"date":"2015-12-04T17:15:19","date_gmt":"2015-12-04T16:15:19","guid":{"rendered":"http:\/\/www.moucha.cc\/charon\/?p=1621"},"modified":"2015-12-04T17:15:19","modified_gmt":"2015-12-04T16:15:19","slug":"accidentally-deleted-user-recovery-active-directory-exchange-2013","status":"publish","type":"post","link":"https:\/\/www.moucha.cc\/charon\/accidentally-deleted-user-recovery-active-directory-exchange-2013\/","title":{"rendered":"Accidentally deleted user recovery (Active Directory &#038; Exchange 2013)"},"content":{"rendered":"<p>Start with recovering user in Active Directory. Download and unzip <a href=\"https:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb963906.aspx\">AdRestore<\/a> utility.<\/p>\n<p>Run <code>adrestore<\/code> to see all deleted objects or <code>adrestore string<\/code> to filter the list by string. Find user you want to recover and run adrestore once more with <code>\/r<\/code> to restore the objects &#8211; you will be propted one by one.<\/p>\n<p><a href=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/adrecover.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/adrecover-600x235.png\" alt=\"adrecover\" width=\"600\" height=\"235\" class=\"alignnone size-large wp-image-1622\" srcset=\"https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/adrecover-600x235.png 600w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/adrecover-400x156.png 400w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/adrecover-800x313.png 800w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/adrecover.png 877w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Now the account will reappear in Active Directoy, but will be disabled. Use what ever way you like (GUI or command line) to change password and enable account back. Add back user to the groups you want optionally.<\/p>\n<p>Now move to Exchange &#8230;<\/p>\n<p>If you deleted user in Active Directory, it disappears from EAC, but its mailbox state is not changed immediately in Exchange database (it changes when regular database maintanance is preformed), so we need to update it manually. To do so, we need to find mailbox GUID first. <\/p>\n<p>Open Exchange Management shell and run following command to list all mailboxes details. Find GUID of the mailbox you want to recover.<\/p>\n<pre>Get-MailboxDatabase | Get-MailboxStatistics | Format-List DisplayName, MailboxGuid, Database, DisconnectReason, DisconnectDate<\/pre>\n<p>Update mailbox state for the particular mailbox, change to your Exchange database name and GUID you found in previous step.<\/p>\n<pre>Update-StoreMailboxState -Database \u201cdb_name\u201d -Identity \u201cguid\u201d<\/pre>\n<p>Then go to Exchange Admin Center to <code>Recipients<\/code> \/ <code>Mailboxes<\/code> and click <code>...<\/code> in the icon line and select <code>Connect Mailbox<\/code>.<\/p>\n<p><a href=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac1-600x338.png\" alt=\"eac1\" width=\"600\" height=\"338\" class=\"alignnone size-large wp-image-1625\" srcset=\"https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac1-600x338.png 600w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac1-400x226.png 400w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac1-800x451.png 800w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac1.png 1440w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Now you should see disconnected mailbox you want to recover. So select it and click connect icon.<\/p>\n<p><a href=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac2-468x600.png\" alt=\"eac2\" width=\"468\" height=\"600\" class=\"alignnone size-large wp-image-1626\" srcset=\"https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac2-468x600.png 468w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac2-312x400.png 312w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac2.png 622w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/a><\/p>\n<p>You&#8217;ll get the warning there is no corresponding user and you must connect it to different user. It may be whatever user which does not have connected mailbox yet. That&#8217;s alright as the account you recovered in Active Directory does not have a mailbox yet. So go ahead. In the following wizard select user mailbox and later the account you recovered.<\/p>\n<p>At the end you may get notification that changes made will be taken into account when Active Directory replication occurs.<\/p>\n<p><a href=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac3-600x403.png\" alt=\"eac3\" width=\"600\" height=\"403\" class=\"alignnone size-large wp-image-1627\" srcset=\"https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac3-600x403.png 600w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac3-400x268.png 400w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac3-800x537.png 800w, https:\/\/www.moucha.cc\/charon\/wp-content\/uploads\/2015\/12\/eac3.png 912w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a> <\/p>\n<p>If you wnat to be sure, trigger replication manually on any domain controller. <\/p>\n<pre>repadmin \/syncall<\/pre>\n<p>Now you should be able to access the mailbox again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Start with recovering user in Active Directory. Download and unzip AdRestore utility. Run adrestore to see all deleted objects or adrestore string to filter the list by string. Find user you want to recover and run adrestore once more with \/r to restore the objects &#8211; you will be propted one by one. Now the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[83,82,84,85],"class_list":["post-1621","post","type-post","status-publish","format-standard","hentry","category-technology","tag-active-directory","tag-exchange-2013","tag-recovery","tag-user"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p20Iro-q9","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/posts\/1621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/comments?post=1621"}],"version-history":[{"count":5,"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/posts\/1621\/revisions"}],"predecessor-version":[{"id":1630,"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/posts\/1621\/revisions\/1630"}],"wp:attachment":[{"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/media?parent=1621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/categories?post=1621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.moucha.cc\/charon\/wp-json\/wp\/v2\/tags?post=1621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}