Link to home
Create AccountLog in
Avatar of Mark
MarkFlag for Ireland

asked on

Need to Set Default Calendar Permissions for users in Exchange Server 2010

Hi,

I  need to set default calendar permissions for all users in the New York Office to "Reviewer".  All User Active Directory Objects have the Office attribute populated with the location "New York". Also how do I get a report that show's that this has been changed for the New York users. I'm using Exchange Server 2010 and PowerShell needs to be used
ASKER CERTIFIED SOLUTION
Avatar of Alex
Alex
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Sorry

$users = get-content C:\temp\users.txt
Foreach ($User in $Users){
set-mailboxfolderpermission -identity $user:\calendar -User Default -AccessRights Reviewer}

It's a \ not a /
Avatar of Mark

ASKER

Thanks is there any PowerShell command that can be used to confirm what Default Calendar permissions they currently have set at the moment?
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Mark

ASKER

Hi,

I was able to generate the users.txt using powershell however when I went to set the permissions in Exchange Server 2010 I got the error message attached.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Mark

ASKER

Hi,

I tried all that and got the error message attached.

User generated image
User generated image
Edit: I correct it but still getting an error message

User generated image
User generated image
Try this in Exchange Management Shell:

Import-Module activedirectory

foreach ($user in (Get-ADUser -Filter {Office -eq 'New York'})) {
  Set-MailboxFolderPermission "$($user.samaccountname):\calendar" -User Default -AccessRights Reviewer
}

Open in new window

Edit: enclosed "$($user.samaccountname):\calendar" in quotes
Note you should not be using PowerShell ISE with this script unless you load the Exchange module first.  You have to use Exchange Management Shell.