Link to home
Start Free TrialLog in
Avatar of Anthony K O365
Anthony K O365Flag for United States of America

asked on

Powershell Assistance--Exchange 2010 Calendar Access Permission

Greetings!

I am looking for the PS cmdlet that will give one user Editor rights to many calendars using a csv file:

  Add-MailboxFolderPermission -identity <  > -user <  > -AccessRights Editor

Please assist.

Thank you.
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Get-Content "CSV location" | Add-MailboxFolderPermission -user <  > -AccessRights Editor

- Rancy
Avatar of Anthony K O365

ASKER

Rancy,

I need the -identity parameter to equal the contents of the fle with a focus on the Calendar only such as  :\Calendar

Thanks for your quick response!

P.S. Also the Get-Content cmdlet is grabbing the Name column. Would Import-csv work also?
Something like this should work:

import-csv c:\file.csv | Add-MailboxFolderPermission :\Calendar -User user@domain.com -AccessRights Reviewer

Simon.
Would this work?

Import-Csv "c:\List.csv" | ForEach-Object { Add-MailboxFolderPermission -identity $($_ +':\Calendar') -User John -AccessRights Editor}
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is the PS script that worked for me:

Import-csv d:\file.csv

$ABC = import-csv

ForEach{Add-MailboxFolderPermission $_":\Calendar" -User John -AccessRights PublishingEditor}
Correction:

Here is the PS script that worked for me:

$ABC = import-csv D:\file.csv

ForEach{Add-MailboxFolderPermission $_":\Calendar" -User John -AccessRights PublishingEditor}
If you are saving import-csv D:\file.csv to a var then it should be something like..

$ABC = import-csv D:\file.csv
ForEach ($a in $ABC) {Add-MailboxFolderPermission $A.Name":\Calendar" -User John -AccessRights PublishingEditor} 

Open in new window

Awesome :)

- Rancy
Excellent discussion!

Thanks!