Create new contacts folder in users mailbox (Exchange 2010)

In this post I’ll walk you through how to use PowerShell to create a new folder under the users contacts folder in Exchange 2010. I imagine this will also work for later version os Exchange as the command still exists in Exchange 2016.. but I haven’t tested it.

The things you need to make this work are:

  1. Rights to the users mailbox
  2. CAS stole installed
  3. Exchange PS-Snapin imported

If you have those 3 items, then it works fine.

So, the issue is that if you run the New-MailboxFolder command out of the box it wont work unless the snapping is installed so the first command you run from the Exchange Administrative Shell is

add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010

Even after running that command you will receive an error that says “Cannot open mailbox”

error1

So, next we grant the account running the command access to the users mailbox.

 

error2

 

If you want to do this using PowerShell (for all mailboxes perhaps) then you can run the command:

Get-Mailbox –result size unlimited | Add-MailboxPermission –User “domainusernamerunningthecommand” -AccessRights “FullAccess”
To subsequently remove access to all mailboxes run the command:
Get-Mailbox –result size unlimited | Remove-MailboxPermission –User “domainusernamerunningthecommand” -AccessRights “FullAccess -confirm:$false”
If you try and run the New-MailboxFolder command, you may still get an error.
error3

This is due to the command being run on a non-Exchange server (perhaps a management workstation). if the command is run on a server with the CAS role installed, it will then execute fine.

error4

One thought on “Create new contacts folder in users mailbox (Exchange 2010)

  1. Don

    You didn’t actually describe how to do anything other than grant permissions. The part I was looking for, added contact folders from EMS, is not here.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.