enforce restriction

Roger Roger 7,181 Reputation points
2024-07-02T21:50:12.4333333+00:00

Hi All

i have room mailboxes in the below format in csv file. i want to enforce restriction and only user1 & user2 should be able to book the room. is the below syntax correct.

EmailAddress
******@contoso.com  
******@contoso.com  

$rooms = Import-Csv -Path "C:\temp\input.csv"
Set-CalendarProcessing -Identity $rooms.EmailAddress -BookInPolicy "******@contoso.com","******@contoso.com" -AllBookInPolicy $false -AddAdditionalResponse $True -AdditionalResponse "This room is restricted."

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,182 questions
Exchange | Exchange Server | Management
Exchange | Hybrid management
{count} votes

Accepted answer
  1. Anonymous
    2024-07-03T02:16:28.27+00:00

    Hi,@Roger Roger

    Thanks for posting your question in the Microsoft Q&A forum.

    The command you provided is correct and can achieve the effect you expect.

     

    You can also use loops to process each room.

     

    $rooms = Import-Csv -Path "C:\temp\input.csv"

    foreach ($room in $rooms) { Set-CalendarProcessing -Identity $room.EmailAddress -BookInPolicy "[******@contoso.com](mailto:******@contoso.com)","[******@contoso.com](mailto:******@contoso.com)" -AllBookInPolicy $false -AddAdditionalResponse $true -AdditionalResponse "This room is restricted." }

    If my answer is helpful to you, please mark it as the answer so that other users can refer to it. Thank you for your support and understanding.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.