{"id":2703,"date":"2018-01-05T12:54:11","date_gmt":"2018-01-05T11:54:11","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=2703"},"modified":"2018-01-05T12:54:11","modified_gmt":"2018-01-05T11:54:11","slug":"exchange-online-reconnect-script","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2018\/01\/exchange-online-reconnect-script\/","title":{"rendered":"Exchange Online Reconnect script"},"content":{"rendered":"<p>I&#8217;ve seen and known many scripts that interact with Exchange Online for extended periods of time. After a while, Exchange Online likes it if you reconnect, this can be an Impliciet Authentication popup, or it can simply drop you based on what command you&#8217;re using.<\/p>\n<p>If you call the following function every loop in whatever you&#8217;re doing, it&#8217;ll automatically force a reconnect to Exchange Online every hour (adjustable if you prefer longer):<\/p>\n<p><strong>Edit:\u00a0<\/strong><a href=\"https:\/\/www.lieben.nu\/liebensraum\/2018\/01\/exchange-online-reconnect-script-v2\/\">read v2 of this post \ud83d\ude42<\/a><\/p>\n<p><strong>Note:\u00a0<\/strong>if you run this script in an Exchange Shell, something in the Exchange Shell modules will still prompt for reconnects every 1-2 days. In a normal PS window, I&#8217;ve verified it working for up to a week until it asks for a reconnect.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve seen and known many scripts that interact with Exchange Online for extended periods of time. After a while, Exchange Online likes it if you reconnect, this can be an Impliciet Authentication popup, or it can simply drop you based on what command you&#8217;re using. If you call the following function every loop in whatever &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2018\/01\/exchange-online-reconnect-script\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Exchange Online Reconnect script<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[18,39],"tags":[],"class_list":["post-2703","post","type-post","status-publish","format-standard","hentry","category-exchange-online","category-powershell"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/2703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=2703"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/2703\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=2703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=2703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=2703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}