[Last Call] Learn how to a build a cloud-first strategyRegister Now


Powershell - Setting Calendar rights with pipe in the syntax

Posted on 2014-08-15
Medium Priority
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 Bill.Smith@it.com:\Calendar -AccessRights Owner -User John.Taylor@it.com -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 “Bill.Smith@it.com” | Set-mailboxfolderpermission :\calendar -AccessRights Owner -User John.Taylor@it.com


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
  • 2
LVL 18

Expert Comment

by:Gaurav Singh
ID: 40262857
LVL 18

Expert Comment

by:Gaurav Singh
ID: 40262862
LVL 41

Accepted Solution

footech earned 2000 total points
ID: 40263629
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


Author Closing Comment

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

Get-Mailbox Bill.Smith@it.com | % {Set-MailboxFolderPermission $_":\Calendar" -User John.Taylor@it.com -AccessRights Owner}

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

834 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