Reset Out of Office through PowerShell
Hi Is it possible to reset Out of Office through PowerShell so that it will return the OOF reply every day? Lasse /Lasse OOO wont reply everyday for the same user. You can use - http://technet.microsoft.com/en-us/library/dd638217.aspxSukh
October 14th, 2011 7:47am

Hi Is it possible to reset Out of Office through PowerShell so that it will return the OOF reply every day? Lasse/Lasse
Free Windows Admin Tool Kit Click here and download it now
October 14th, 2011 12:52pm

Hi Lasse You can set the OOF via Powershell, see the links below for exmaples of howto: http://www.mikepfeiffer.net/2010/07/manage-exchange-2007-out-of-office-oof-settings-with-powershell-and-the-ews-managed-api/ http://gsexdev.blogspot.com/2009/08/setting-out-of-office-oof-with.html http://www.powergui.org/thread.jspa?threadID=10736 BR MadsPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
October 14th, 2011 12:58pm

Hi Is it possible to reset Out of Office through PowerShell so that it will return the OOF reply every day? Lasse /Lasse OOO wont reply everyday for the same user. You can use - http://technet.microsoft.com/en-us/library/dd638217.aspxSukh
Free Windows Admin Tool Kit Click here and download it now
October 14th, 2011 2:39pm

On Fri, 14 Oct 2011 11:39:22 +0000, Sukh828 wrote: > > >Hi > >Is it possible to reset Out of Office through PowerShell so that it will return the OOF reply every day? > >Lasse >/Lasse > >OOO wont reply everyday for the same user. It will if you turn it off and back on every day. That's what he's asking about. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
October 14th, 2011 5:39pm

thanks for the clarificationSukh
Free Windows Admin Tool Kit Click here and download it now
October 14th, 2011 6:18pm

On Fri, 14 Oct 2011 11:39:22 +0000, Sukh828 wrote: > > >Hi > >Is it possible to reset Out of Office through PowerShell so that it will return the OOF reply every day? > >Lasse >/Lasse > >OOO wont reply everyday for the same user. It will if you turn it off and back on every day. That's what he's asking about. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
October 15th, 2011 12:30am

Hi LasseF, As above said, OOF only reply for the same user once unless you turn it off and turn it on per day. If you really need to do this, you can write a PowerShell script of turn off\on the OOF and schedule it to run once every day :) Here is a similar thread, but I don't test the script in it, you can have a try. http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/341ae494-9775-4607-b037-9805cbc3a3ef Jack Zhou
Free Windows Admin Tool Kit Click here and download it now
October 16th, 2011 11:37pm

Hi Mads I have added the EWS Managed API and can now use the Get-MailboxAutoReplyConfiguration and Set-MailboxAutoReplyConfiguration. I have run the following: Get-Mailbox | Get-EWSOofSettings | ?{$_.state -eq "Enabled"} | select identity, state I get the users with OOF enabled but I also get quite alot of these: Exception calling "GetUserOofSettings" with "1" argument(s): "Microsoft.Exchang e.Data.Storage.AccessDeniedException: User is not mailbox owner. User = S-1-5-2 1-725345543-1284227242-682003330-500, MailboxGuid = S-1-5-21-725345543-12842272 42-682003330-3619 ---> User is not mailbox owner. User = S-1-5-21-725345543-128 4227242-682003330-500, MailboxGuid = S-1-5-21-725345543-1284227242-682003330-36 19" At line:23 char:43 + $oof = $service.GetUserOofSettings <<<< ($PrimarySmtpAddress) + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException I have tried looking up the GUID, but it doesn't seem to belong to a user? Lasse /Lasse
October 17th, 2011 4:26am

As far as I can see the above error message doesn't do anything. I get the list with the users that have OOF enabled. Now I need to make a PS script that will check which users have OOF enabled and then disable it and enable it, but can't quit figure out how to do it yet, but I am sure that I will find a solution :-)/Lasse
Free Windows Admin Tool Kit Click here and download it now
October 17th, 2011 5:10am

Hi LasseF, Thanks for your update. I have a test on the script in the link and it works. After I run the ps script, I can receive the OOF reply again. You can have a try. Here is the script: $enabled = get-mailbox -resultsize unlimited |get-mailboxautoreplyconfiguration | where {$_.autoreplystate -eq "enabled"} | select identity,autoreplystate $enabled | foreach-object { set-mailboxautoreplyconfiguration $_.identity -autoreplystate "Disabled" set-mailboxautoreplyconfiguration $_.identity -autoreplystate $_.autoreplystate } If it works, you can save the script as PS1 file and schedule to run the PS1 file one time a day to achieve your goal. Jack Zhou
October 17th, 2011 10:58pm

Hi Jack, I found the solution yesterday. We are running Exchange 2007 SP3 so had to install the EWS API and add the function Get-EWSOofSettings. It works, but I still get the error messages that I posted earlier. I was just worried that I was missing some users with OOF enabled. $enabled = get-mailbox -resultsize unlimited | Get-EWSOofSettings | where {$_.state -eq "Enabled"} | select identity,state $enabled | foreach-object { Set-EWSOofSettings -Identity $_.identity -State disabled Set-EWSOofSettings -Identity $_.identity -State enabled } /Lasse
Free Windows Admin Tool Kit Click here and download it now
October 18th, 2011 2:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics