How to Create. BookIn Policy for a Specific Domain in O365

Atul Tyagi 20 Reputation points
2023-05-23T15:49:19.4966667+00:00

Greetings !

I am trying to set a BookInPolicy for a specific domain users but the below script is not working.

Set-CalendarProcessing -identity "room@abc.com" - AllRequestInPolicy $False - RequestInPolicy @{add="*@domain.com"}

need help I am unable to set the policy with this script

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,374 questions
{count} votes

Accepted answer
  1. Aholic Liang-MSFT 13,826 Reputation points Microsoft Vendor
    2023-05-24T08:27:04.6433333+00:00

    Hi @ Atul Tyagi

    You can refer to the following command to get all user mailboxes in a specified domain:

    $users= Get-Mailbox -resultsize unlimited  -RecipientTypeDetails UserMailbox | Select-Object displayname -expandproperty emailaddresses| Where-Object {$_.smtpaddress -like "*contoso.com*"}
    

    Then refer to this command to add all users to the requestinpolicy for this resource mailbox:

    Set-CalendarProcessing -identity “room1@contoso.com” -AllRequestInPolicy $False -RequestInPolicy $users.smtpaddress
    

    Please use the following command to verify success:

    get-CalendarProcessing -identity "room1@contoso.com" |fl
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Andy David - MVP 145.1K Reputation points MVP
    2023-05-23T17:47:02.4933333+00:00
    1 person found this answer helpful.
    0 comments No comments