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


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?


Who is Participating?
duh123Author Commented:

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.

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?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.