[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

office 365 out of office powershell

Posted on 2013-06-10
11
Medium Priority
?
2,120 Views
1 Endorsement
Last Modified: 2013-06-10
Does anyone know the powershell commands to turn off out of office replies on all users.
office 365
1
Comment
Question by:WIZU2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 39235626
For one user:

Set-MailboxAutoReplyConfiguration -Identity mailboxname@company.com –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null
0
 

Author Comment

by:WIZU2
ID: 39235641
How can I do the whole company at once? I setup up OOF reply during a migration for everyone now I need to take it off.
0
 
LVL 19

Accepted Solution

by:
Raheman M. Abdul earned 1500 total points
ID: 39235671
Try:

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') | Set-MailboxAutoReplyConfiguration  –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:WIZU2
ID: 39235705
I ran it and it did something. The below is displayed

PS Z:\> Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') | Set-MailboxAutoReplyConfig
uration  -AutoReplyState Disabled -ExternalMessage $null -InternalMessage $null
>>
The cursor is just blinking next to the >>
Is it waiting for more input?

Thanks for your help!!
0
 

Author Comment

by:WIZU2
ID: 39235714
I didn't get any error though.
0
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 39235822
Are you running this on the same server where exchange mailboxes exists?

Try this first:

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')

let me know the outcome
0
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 39235839
I have tried for around 10 mailboxes and got the results working. I guess you have too many mailboxes and is the reason for the delay.

Try:
Get-Mailbox -ResultSize 5 -Filter {(RecipientTypeDetails -eq 'UserMailbox')

then Try :
Get-Mailbox -ResultSize 5 -Filter {(RecipientTypeDetails -eq 'UserMailbox') | Set-MailboxAutoReplyConfiguration  –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null

we just take 5 mailboxes and see how it goes.
0
 

Author Comment

by:WIZU2
ID: 39235927
No I am connecting remotely. When I run the above it goes to the

>>  with a blinking cursor. Am I using wrong powershell?
0
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 39235948
Try this and see :

To list all the mailboxes and their autoreplystate :

get-mailbox | Get-MailboxAutoReplyConfiguration | select mailboxownerid, Autoreplystate
0
 

Author Comment

by:WIZU2
ID: 39236025
It came back with a list of all the mailboxes, some show enabled, some are disabled. Maybe I didn't let the run long enough. There are over 100 mailboxes.
0
 

Author Comment

by:WIZU2
ID: 39236233
Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') | Set-MailboxAutoReplyConfiguration  –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null



$UserAccounts = Get-Mailbox -ResultSize Unlimited
ForEach ($user in $UserAccounts)
{
Set-MailboxAutoReplyConfiguration $user.name –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null;
}
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Microsoft is moving in-place eDiscovery & hold from ECP to EOP console under Content Search in Search and Investigation Options.  In this post, I will be showing you how to export emails to a PST file using the Content Search Options.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question