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:
- Rights to the users mailbox
- CAS stole installed
- 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
Even after running that command you will receive an error that says “Cannot open mailbox”
So, next we grant the account running the command access to the users mailbox.
If you want to do this using PowerShell (for all mailboxes perhaps) then you can run the command:
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.