Adding multiple Users to BookInPolicy in Exchange 2010

Am I desperate? Yes I am!

I need to add multiple users to the Bookinpolicy in multiple RoomMailboxes, but I just can't get it to work

I have a csv-file formated like this:
RoomAlias,UserAliases
Room1,"user1,user4,user81"
Room4,"user43,user5,user1,user4"
Room12,"user2,user1,user55"

I have tried with this an some other scipts, but with no success.
$rooms	= Import-csv c:\tools\csv\rooms.csv

foreach($room in $rooms){

	Set-CalendarProcessing `
		-Identity $room.roomalias `
		-BookinPolicy $room.UserAliases `
		-AllBookInPolicy $false

}

Open in new window

Can anyone help me out here?
Kasper KatzmannSeniorkonsulentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SubsunCommented:
0
Kasper KatzmannSeniorkonsulentAuthor Commented:
Thats some of the scripts I have testet.
The first one is written for Exchange 2007 (i think).

The other scripts gives me errors as well.
0
SubsunCommented:
Try this and see if it works for you..
Import-csv c:\tools\csv\rooms.csv | % {
$Resource = (Get-CalendarProcessing $_.RoomAlias).BookinPolicy
$Resource += ($_.UserAliases).split(",") | Get-mailbox | Select -ExpandProperty Identity

Set-CalendarProcessing `
		-Identity $_.roomalias `
		-BookinPolicy $Resource `
		-AllBookInPolicy $false
		
}

Open in new window

PS : I have not added any kind or error control..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.