Powershell - Setting Calendar rights with pipe in the syntax

Posted on 2014-08-15
Last Modified: 2014-08-18
Dear Experts,

I am aware of this below command in PowerShell for adding/setting Calendar rights and that works fine:

Add-MailboxFolderPermission -Identity\Calendar -AccessRights Owner -User -Confirm

But I would be interested in how would look the syntax with pipe after Get-Mailbox, tried with this one but unfortunately does not work:

Get-Mailbox “” | Set-mailboxfolderpermission :\calendar -AccessRights Owner -User


ps.: (at SendAs rights the Get-Mailbox "TestSharedMailbox" | Add-ADPermission -User IT\John.Taylor -AccessRights ExtendedRight -ExtendedRights "send as" sure works so assuming that should be also at Calendar rights)
Question by:csehz
    LVL 17

    Expert Comment

    by:Gaurav Singh
    LVL 17

    Expert Comment

    by:Gaurav Singh
    LVL 38

    Accepted Solution

    Here's an example.  You need to use Set-MailboxFolderPermission within the foreach-object scriptblock.
    Get-Mailbox | % {Set-MailboxFolderPermission $_":\Calendar" -User Default -AccessRights LimitedDetails}

    Open in new window

    LVL 1

    Author Closing Comment

    Thanks that is great, concretely I tried this syntax and works fine

    Get-Mailbox | % {Set-MailboxFolderPermission $_":\Calendar" -User -AccessRights Owner}

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Email statistics and Mailbox database quotas You might have an interest in attaining information such as mailbox details, mailbox statistics and mailbox database details from Exchange server. At that point, knowing how to retrieve this information …
    Get an idea of what you should include in an email disclaimer with these Top 5 email disclaimer tips.
    In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
    This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now