Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 955
  • Last Modified:

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.
0
Anthony K O365
Asked:
Anthony K O365
  • 5
  • 3
  • 2
  • +1
2 Solutions
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Get-Content "CSV location" | Add-MailboxFolderPermission -user <  > -AccessRights Editor

- Rancy
0
 
Anthony K O365Author Commented:
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?
0
 
Simon Butler (Sembee)ConsultantCommented:
Something like this should work:

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

Simon.
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Anthony K O365Author Commented:
Would this work?

Import-Csv "c:\List.csv" | ForEach-Object { Add-MailboxFolderPermission -identity $($_ +':\Calendar') -User John -AccessRights Editor}
0
 
SubsunCommented:
Try..
Import-Csv c:\input.csv | % {
$mailbox = Get-mailbox $_.Name
Set-mailboxfolderpermission –identity ($mailbox.alias+’:\calendar’) –user User –Accessrights Editor}

Open in new window

Csv format should be
Name
User1
User2
User3

Open in new window

0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Yes Import-csv would work as well ... i would say if try with placing the Identity as UserName:\Calendar in the CSV and check

- Rancy
0
 
Anthony K O365Author Commented:
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}
0
 
Anthony K O365Author Commented:
Correction:

Here is the PS script that worked for me:

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

ForEach{Add-MailboxFolderPermission $_":\Calendar" -User John -AccessRights PublishingEditor}
0
 
SubsunCommented:
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

0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Awesome :)

- Rancy
0
 
Anthony K O365Author Commented:
Excellent discussion!

Thanks!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 5
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now