Exchange Resource BookInPolicy
How can I add users to the BookInPolicy for a resource without removing the existing users? I would think there would be some way to script this, maybe by getting the current users, storing them in a variable, and then adding the users I need to add to that list. I don't have much experience with scripting so I don't know if this is possible, or where to even start. I've searched on Google, but haven't found any solutions.
June 8th, 2010 6:51pm

Hi, The cmdlet Set-MailboxCalendarsettings automatically removes everyone from the BookInPolicy. You can add users to the BookInPolicy without removing the existing users by using OWA: 1. Log into resource mailbox by using OWA. 2. Click Option->Resource Settings. Under "Specify users and groups which have permission to schedule this resource by sending a meeting request. These users can schedule automatically if the resource is available", type the users' alias, such as: Administrator;user1;user2.
Free Windows Admin Tool Kit Click here and download it now
June 9th, 2010 10:57am

Thanks Thomas. The problem is we have almost 50 rooms, and to have to log into OWA 50 times to add a user to the BookInPolicy is a huge was of time. That's why I was hoping there was some way to do it through the power shell and query each room to see whose already listed in the BookInPolicy, store that maybe in a variable, and then add the additional users to that list. The way I currently do it is by keeping a list of users who I've already added to the rooms so I can run cmdlet and just re-add all of the users along with the new users. But again, having to keep a list of users is a bit of a pain as well.
June 9th, 2010 3:22pm

How about something like this: (please excuse the var names, I mutated this code block from an other script and didnt bother changing them) function Add-BookinPolicyUser{ $Resource = read-host "Enter Resource Name" Write-Host "";Write-Host "" $del = Read-Host "Enter New Book In Policy userID's" $delegate = $del.split(",") #$delegateCheck = Get-Mailbox $delegate -ErrorAction SilentlyContinue #If ($delegateCheck.HiddenFromAddressListsEnabled -ne $false){ #Write-Host "UserID is not mailbox Enabled or is Hidden";Break} $check = Get-Mailbox -Identity $resource -ErrorAction SilentlyContinue | select RecipientTypeDetails if ($check.RecipientTypeDetails -ne "RoomMailbox"){ Write-Host "This is not a Resource, I Quit!";Break} Else { $xDelegates = Get-MailboxCalendarSettings -Identity $resource | select Bookinpolicy} if (!$xDelegates.Bookinpolicy){ Set-Mailboxcalendarsettings -Identity $Resource -BookinPolicy $delegate foreach ($u in $delegate) { Set-Calperm -TargetCalendar $Resource -UserID $u -Permissions Editor } write-host "Completed!";break} Else { foreach ($u in $delegate) { $adelegate = Get-User $u |Select-Object DistinguishedName $xDelegates.BookinPolicy.Add($adelegate.distinguishedname) } Set-Mailboxcalendarsettings -Identity $Resource -BookinPolicy $xDelegates.Bookinpolicy foreach ($u in $delegate) { Set-Calperm -TargetCalendar $Resource -UserID $u -Permissions Editor } write-host "Completed!" } }
Free Windows Admin Tool Kit Click here and download it now
June 9th, 2010 3:50pm

Thanks newdamage1! I had to remove a couple of things to get it to work, but it's working. I had to remove the following lines: Removed this line because nothing would happen when I ran the script: function Add-BookinPolicyUser{ } and removed these lines because it didn't recognize Set-Calperm as a valid command: foreach ($u in $delegate) { Set-Calperm -TargetCalendar $Resource -UserID $u -Permissions Editor } The only problem is it works well for one room at a time, but what I'd really like it to do is all of our rooms at once. So rather than it asking for a resource name, I'd like to be able to hardcode something similar to this: $resource = Get-Mailbox | where {$_.ResourceType -eq "Room"} I tried removing the first part where it asks for the resource and hardcoding $resource, but it errors out.
June 9th, 2010 9:55pm

For the future, why not use a security groups.
Free Windows Admin Tool Kit Click here and download it now
June 9th, 2010 10:26pm

Forgot to remove the set-calperm, that's an inhouse cmdlet that we use for setting folder permissions because our users "absolutely must" open the calendar in Outlook too. ;) I guess i have to ask what are you need to do, add a single user to multiple resources, or multiple users to multiple resources.
June 10th, 2010 3:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics