How to activate "Out of Office" through powershell in ex2007

Posted on 2009-02-17
Last Modified: 2012-05-06

I'm trying to activate Out of Office for a mailbox on exchange 2007 through powershell.
I'm using the EWSOofUtil.dll from

And I can't get it working unless I provide the mailbox owners credentials.
But I don't know all passwords of all users.

If i run it as ExOrgAdmin I get an 'unauthorized', and if I run it as ExViewOnlyAdmin I get 'User is not not mailbox owner'

Is there another way to do it?
I dont' want to do it through CDO, although with CDO it works fine.
Please help?


Question by:duh123
    LVL 65

    Expert Comment

    Considering the script is developed by someone, rather than built in, it would probably be best to direct questions at the person who developed it. Your problem is almost certainly connected with permissions, but as there is nothing on the site about what permissions are required, it is almost impossible to answer.

    Have you tried use the tool that has been developed by the same author as the post that you have linked to above?


    Accepted Solution


    In the meantime I tried to do it with EWS.
    I found a very usefull example at

    When I impersonate as mailbox owner it works perfect. But not with my credentials (I'm exchange org admin) and also not with other admin roles - I get the error "Microsoft.Exchange.Data.Storage.AccessDeniedException: User is not mailbox owner"

    I think I need an admin account that has owner-level access to all mailboxes - how to do that ?
    I tought this would work if I give an admin full access rights, but still get that error.


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
    In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    745 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

    14 Experts available now in Live!

    Get 1:1 Help Now