{"id":2727,"date":"2016-03-09T09:51:20","date_gmt":"2016-03-09T07:51:20","guid":{"rendered":"http:\/\/9v.lt\/blog\/?p=2727"},"modified":"2022-01-19T08:34:37","modified_gmt":"2022-01-19T06:34:37","slug":"set-office-programmatically-o365-powershell","status":"publish","type":"post","link":"http:\/\/9v.lt\/blog\/set-office-programmatically-o365-powershell\/","title":{"rendered":"Set out-of-office programmatically in O365 with powershell"},"content":{"rendered":"<p>Part of our employee synchronization from employee database to our AD is setting an out-of-office message in Office365 when the user gets disabled (to send a notice that the user no longer works here to whoever sends that person an email), and removing the message when that same person comes back to work. For this, I made a powershell script (damn, I love powershell) that lists all disabled users in our AD and goes through everyone checking if it has a message set up, if not then it sets one.<\/p>\n<p>Script can be found <a href=\"http:\/\/9v.lt\/projects\/powershell\/setOutOfOffice.ps1\" target=\"_blank\" rel=\"noopener\">here<\/a>, in my projects folder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part of our employee synchronization from employee database to our AD is setting an out-of-office<\/p>\n","protected":false},"author":2,"featured_media":2721,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,750],"tags":[952,951,949],"class_list":["post-2727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","category-software-projects","tag-activedirectory","tag-ad","tag-powershell"],"_links":{"self":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/posts\/2727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/comments?post=2727"}],"version-history":[{"count":0,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/posts\/2727\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/media\/2721"}],"wp:attachment":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/media?parent=2727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/categories?post=2727"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/tags?post=2727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}