Powershell command to LIST all calendars a user has in their mailbox.

I have an issue, I have done this before and it worked fine:

I created a 365 user account, and shared a calendar, then created a group and gave that group read/write (author) access to it.

but ever since exchange/365 upgraded its self to exchange 2013, I keep getting an error when trying to do the same sort of thing with a user, I have created the calendar, and for some reason when I try do the command to change permissions for it, I get the following error:

"The operation couldn't be performed because 'oc@company.com.au:\HR Leave' couldn't be found."

obviously I changed the company name from its real one, but that's after I did the following command:

Add-MailboxFolderPermission -Identity "oc@company.com.au:\HR Leave" -AccessRights Owner -User doug@company.com.au

I thought maybe it was because the calendar I created has a space in the name, so I changed it to just HR, but that too didn't work... what's going on?!?

Is Microsoft just being spastic today or am I doing something wrong... I even tried that with just the username without the @domain name instead, didn't work, same error...

I really would appreciate any help you can give me in relation to this matter. 

August 30th, 2013 3:50am

To list all the folders in the mailbox, use the below shell command

Get-MailboxFolderStatistics "MailboxName" | ft Name, Identity, folderpath, foldertype > C:\Temp\Test.txt

Open the file and you will see all the folders in the mailbox, and the folder type calendar will give you the calendar folder names in the mailbox

Free Windows Admin Tool Kit Click here and download it now
August 30th, 2013 8:57am

Thank you for that, so I did that, it gave me what I already knew:

HR Leave                              oc\Calendar\HR Leave                  /Calendar/HR Leave                   User Created

so I ran the command:

Add-MailboxFolderPermission -Identity "oc\Calendar\HR Leave" -AccessRights Owner -User "doug"

and it still gives me:

The specified mailbox "oc\Calendar\HR Leave" doesn't exist.
    + CategoryInfo          : NotSpecified: (:) [Add-MailboxFolderPermission], ManagementObjectNotFoundException

I even tried "oc\HR Leave" without the calendar bit, same error.

any other ideas?? its basically always telling me that it cant find what it shows me...which doesn't make any sense, and I can see it online, it definitely exists, the username is correct, the account I'm using is top level admin so why does it do this, does Microsoft hate people or something?? why not make this sh** an easy to do html format page with point and click buttons..... why the heck does everything have to be done in powershell for office 365.

August 30th, 2013 2:36pm

Are you able grant permission to the calendar?

Add-MailboxFolderPermission -Identity "oc@domain.com.au:\Calendar" -AccessRights Owner -User "doug"

or

Add-MailboxFolderPermission -Identity "oc@domain.com.au:\Inbox" -AccessRights Owner -User "doug"

If nothing works, for now...

1. Add full access permission for your account on OC mailbox like

Add-MailboxPermission -Identity oc@domain.com.au -AccessRights fullaccess -User "doug"

2. Add the OC mailbox as additional mailbox in your outlook profile and then access the calendar of OC, grant required permissions to respective users


Free Windows Admin Tool Kit Click here and download it now
August 30th, 2013 4:00pm

Hi,

Please understand the identity parameter takes the following format: <SMTP Address or Alias of Recipient>:<Folder path>. The following is an example:john@contoso.com:\Calendar.

I recommend you try the command below:

Add-MailboxFolderPermission -Identity oc@company.com.au:\Calendar\HR Leave -User doug@company.com.au -AccessRights Owner

Hope it helps.

Regards,

Rebecca

September 2nd, 2013 8:05am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics