2

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

user879
  • 269
  • 2
  • 6
  • 21
  • 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 09 '18 at 03:21
  • mail box was first created in On-premise and then migrated to office 365. – user879 May 09 '18 at 04:21

1 Answers1

2

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

Niko.Cheng
  • 511
  • 2
  • 4