Im searching a way to set "Out of office" message for a user who is in office 365/exchange hybrid environment via powershell. We have a exchange hybrid environment. (some users are in onpremis exchange and some users are office 365. )

For on premise users we set "out of office" message using below powershell command

Set-MailboxAutoReplyConfiguration -Identity xyz -AutoReplyState Scheduled –StartTime (get-date) -EndTime (get-date).addyears(1) -InternalMessage "Dear,-ExternalMessage "Dear"

But this wont work for office 365 user.

The operation couldn't be performed because object 'xyz' couldn't be found on 'domaincontroller"

Any possibility to set office 365 user "Out of office" message via powershell/emc ?

According to my research i found that in exchange hybrid environment commands are changed such as new-mailbox becomes new-remotemailbox. Like wise what would be the command for Set-MailboxAutoReplyConfiguration in office 365 ?

I could find only below compatible commands.

enter image description here

  • Is there an On-premise object for Office 365 mailbox? If this mailbox is created in Office 365, we need to use New-RemoteMailbox to create On-premise object for those mailbox first, then On-premise user can view this object in GAL. – Jianfei Wang May 9 '18 at 3:21
  • mail box was first created in On-premise and then migrated to office 365. – user879 May 9 '18 at 4:21

You can connect to Exchange online powershell and run "Set-MailboxAutoReplyConfiguration" cmdlet for O365 users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.