Solved

office 365 out of office powershell

Posted on 2013-06-10
11
1,743 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
  • 6
  • 5
11 Comments
 
LVL 18

Expert Comment

by:Raheman M. Abdul
Comment Utility
For one user:

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

Author Comment

by:WIZU2
Comment Utility
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 18

Accepted Solution

by:
Raheman M. Abdul earned 500 total points
Comment Utility
Try:

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

Author Comment

by:WIZU2
Comment Utility
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
Comment Utility
I didn't get any error though.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 18

Expert Comment

by:Raheman M. Abdul
Comment Utility
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 18

Expert Comment

by:Raheman M. Abdul
Comment Utility
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
Comment Utility
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 18

Expert Comment

by:Raheman M. Abdul
Comment Utility
Try this and see :

To list all the mailboxes and their autoreplystate :

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

Author Comment

by:WIZU2
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
This article will help you understand what HashTables are and how to use them in PowerShell.
This Experts Exchange lesson shows how to use VBA to loop through rows in Excel.  In order to sort, filter, and use database features, there needs to be a value in each column for every row. When data arrives with values missing, code to copy values…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now