enforce restriction

Roger Roger 6,406 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
room1@contoso.com  
room2@contoso.com  

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

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,576 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,667 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,135 questions
{count} votes

Accepted answer
  1. Bruce Jing-MSFT 5,640 Reputation points Microsoft Vendor
    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 "[user1@contoso.com](mailto:user1@contoso.com)","[user2@contoso.com](mailto:user2@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.