Occasionally I get asked to set the Out of Office for one of the employees. The only way to do with in Office365 is to give myself full delegation rights to the users exchange account, log into their inbox and set it. I really hate this as it feels like an invasion of privacy to me. So I started looking into what I can do with PowerShell and came up with this.
Set-MailboxAutoREplyConfiguration -Identity xxx -AutoReplyState Scheduled -Confirm -StartTime "06/13/2018 08:00:00" -EndTime "06/13/2018 12:00:00" -InternalMessage "Testing Out Of Office Via Powershell"
Now this does turn on the OOF and sets the message accordingly, however it sets the time as 6PM to 10PM. Its not a timezone issue as I have tried it on my own PC and have tried another user in the office and they end up with the same time.
Can someone please help with where I am going wrong?
OK, I think it is converting from Australian time to US time Does this mean I need to enter my times in US time or is there an easy way to convert the string to a US date/time string?