Exchange Server TechCenter > Exchange Server 2010 Forums > Exchange Server 2010 > Add-MailboxFolderPermission for every Mailbox

Answered Add-MailboxFolderPermission for every Mailbox

  • Monday, August 02, 2010 2:22 PM
     
     

    Hello

    I tried to add Special Folder Permission to every Mailbox (Calender) in our organization.

    get-mailbox mma | Add-MailboxFolderPermission -identity ($_.alias+ ":\Kalender") -AccessRights LimitedDetails -User Default

    This command does not work. I get the following error message:

    The input object cannot be bound to any parameters for the command either because the command does not take pipeline in
    put or the input and its properties do not match any of the parameters that take pipeline input.

    The single command works without problem: Add-MailboxFolderPermission -identity mma:\Kalender -AccessRights LimitedDetails -User Default
    (where mma stands for the AD User)

    What am I doing wrong?

Answers

  • Tuesday, August 03, 2010 8:53 AM
     
     Answered

    Hi,

    Try

    foreach ($Mailbox in (Get-Mailbox -ResultSize Unlimited)) { Add-MailboxFolderPermission -identity "$($Mailbox.Name):\Kalender" -AccessRights LimitedDetails -User Default }

    Steve


    -------- Blog: http://www.stevieg.org Twitter: http://twitter.com/stevegoodman
    • Proposed As Answer by Steve Goodman Tuesday, August 03, 2010 8:53 AM
    • Marked As Answer by murratore Tuesday, August 03, 2010 9:00 AM
    •  

All Replies

  • Monday, August 02, 2010 2:31 PM
     
     
    remove the MMA from the first part of the command; this will get all Mailboxes in the environment
    Sean McNeill Microsoft Gold Partner http://staterainfrastructure.blogspot.com/
  • Monday, August 02, 2010 3:10 PM
     
     

    Ops. Yes I put the wrong command in the forum.

    Just for Testing I had the "MMA" in there.

     

    This command also doesn't work

    get-mailbox | Add-MailboxFolderPermission -identity ($_.alias+ ":\Kalender") -AccessRights LimitedDetails -User Default

  • Monday, August 02, 2010 3:30 PM
     
     

    Hi,

    Plz tell us what error did u get?

    Alslo Try this one:

    get-mailbox | Add-MailboxFolderPermission -identity "$($_.Alias):\Kalender" -AccessRights LimitedDetails -User Default

    OR

    get-mailbox | Add-MailboxFolderPermission -identity "$($_.Name):\Kalender" -AccessRights LimitedDetails -User Default

    Regards,


    Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
  • Tuesday, August 03, 2010 8:39 AM
     
     

    Both commands don't work....

    Error Message:

    The input object cannot be bound to any parameters for the command either because the command does not take pipeline in
    put or the input and its properties do not match any of the parameters that take pipeline input.
        + CategoryInfo          : InvalidArgument: (Michael Maurer:PSObject) [Add-MailboxFolderPermission], ParameterBindi
       ngException
        + FullyQualifiedErrorId : InputObjectNotBound,Add-MailboxFolderPermission

  • Tuesday, August 03, 2010 8:53 AM
     
     Answered

    Hi,

    Try

    foreach ($Mailbox in (Get-Mailbox -ResultSize Unlimited)) { Add-MailboxFolderPermission -identity "$($Mailbox.Name):\Kalender" -AccessRights LimitedDetails -User Default }

    Steve


    -------- Blog: http://www.stevieg.org Twitter: http://twitter.com/stevegoodman
    • Proposed As Answer by Steve Goodman Tuesday, August 03, 2010 8:53 AM
    • Marked As Answer by murratore Tuesday, August 03, 2010 9:00 AM
    •  
  • Wednesday, August 04, 2010 6:34 AM
     
     

    Hi,

    Steve's solution worked for me, except I had to change "\Kalender" in "\Calendar" (and refine the query a bit with the -OrganizationalUnit parameter).

    Cheers
    Jaap Wesselius