Forum Discussion
simonmccarthy
Jan 11, 2021Copper Contributor
Block access to all calendars for a certain group
HI All , really hoping you can help. I have been looking online and on forums for a solution but cant seem to get the right wording, as im sure someone else must have a similar issue. We have...
simonmccarthy
Jan 11, 2021Copper Contributor
Thanks for this, seems a great place to start!
Is there a way of bulk changing this if all of the staff are in a security group also, as this will be over 300 staff to change otherwise 😞
Many thanks
boneyfrancis
Jan 12, 2021Iron Contributor
The Identity parameter cannot be a security group, however you can loop in through all users as follows:
1. Create a CSV file with email addresses of all the Users (User1@domain.com, User2@domain.com.. User300@domain.com listed one below the other)
2. Run the cmdlet:
foreach ($user in (import-csv <path to file.csv>)){Add-MailboxFolderPermission -Identity $user:\Calendar -User "Contractors@domain.com" -AccessRights None
1. Create a CSV file with email addresses of all the Users (User1@domain.com, User2@domain.com.. User300@domain.com listed one below the other)
2. Run the cmdlet:
foreach ($user in (import-csv <path to file.csv>)){Add-MailboxFolderPermission -Identity $user:\Calendar -User "Contractors@domain.com" -AccessRights None