{"id":2008,"date":"2013-08-14T01:52:13","date_gmt":"2013-08-14T01:52:13","guid":{"rendered":"https:\/\/pipe2text.com\/?page_id=2008"},"modified":"2013-12-09T18:05:30","modified_gmt":"2013-12-09T18:05:30","slug":"force-directory-synchronization-between-active-directory-and-office-365-using-powershell","status":"publish","type":"page","link":"https:\/\/pipe2text.com\/?page_id=2008","title":{"rendered":"Force Directory Synchronization between Active Directory and Office 365 using PowerShell"},"content":{"rendered":"<p>Hi all,<\/p>\n<p>There may be times when you need a change that was made in your on premises Active Directory to be immediately synchronized rather than waiting 3 hours for the next sync. For example, a user is removed from Active Directory or a change in an attribute such as a user\u2019s Title was made. There is a quick and easy way to do this using PowerShell following the instructions in this blog.<\/p>\n<p>First, you will need to log on the server where the Microsoft Online Directory Synchronization Tool was installed and open PowerShell as Administrator. Navigate to the \u201dC:\\Program Files\\Microsoft Online Directory Sync\u201d as shown below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline;\" alt=\"\" src=\"https:\/\/pipe2text.com\/wp-content\/plugins..\/..\/uploads\/media\/force-directory-synchronization-between-active-directory-and-office-365\/image1.png\" width=\"674\" height=\"205\" \/><\/p>\n<p>Next type the following command and press enter to execute the \u201cPowerShell Console File\u201d:<\/p>\n<p>.\\DirSyncConfigShell.psc1<\/p>\n<p>A second PowerShell window will open as shown below.<\/p>\n<p><img decoding=\"async\" style=\"display: inline;\" alt=\"\" src=\"https:\/\/pipe2text.com\/wp-content\/plugins..\/..\/uploads\/media\/force-directory-synchronization-between-active-directory-and-office-365\/image2.png\" \/><\/p>\n<p>In the new window type the following command and press enter:<\/p>\n<p>Start-OnlineCoexistenceSync<\/p>\n<p><img decoding=\"async\" style=\"display: inline;\" alt=\"\" src=\"https:\/\/pipe2text.com\/wp-content\/plugins..\/..\/uploads\/media\/force-directory-synchronization-between-active-directory-and-office-365\/image3.png\" \/><\/p>\n<p>Now open the Event Viewer and navigate to the Application log and you will see event for Directory Synchronization as shown below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline;\" alt=\"\" src=\"https:\/\/pipe2text.com\/wp-content\/plugins..\/..\/uploads\/media\/force-directory-synchronization-between-active-directory-and-office-365\/image4.png\" width=\"701\" height=\"141\" \/><\/p>\n<p>If you will open Event ID 4 you will see that the export has completed as shown in the following illustration.<\/p>\n<p><img decoding=\"async\" style=\"display: inline;\" alt=\"\" src=\"https:\/\/pipe2text.com\/wp-content\/plugins..\/..\/uploads\/media\/force-directory-synchronization-between-active-directory-and-office-365\/image5.png\" \/><\/p>\n<p>You can also login to the Office 365 Portal and verify the changes there as well.<\/p>\n<p>I hope this helps. As always, if you have any questions or feedback, please leave a comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi all, There may be times when you need a change that was made in your on premises Active Directory to be immediately synchronized rather than waiting 3 hours for the next sync. For example, a user is removed from &hellip; <a href=\"https:\/\/pipe2text.com\/?page_id=2008\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"class_list":["post-2008","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/2008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pipe2text.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2008"}],"version-history":[{"count":10,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/2008\/revisions"}],"predecessor-version":[{"id":2318,"href":"https:\/\/pipe2text.com\/index.php?rest_route=\/wp\/v2\/pages\/2008\/revisions\/2318"}],"wp:attachment":[{"href":"https:\/\/pipe2text.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}