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 "*****@abc.com" - AllRequestInPolicy $False - RequestInPolicy @{add="@domain.com"}

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

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,190 questions
{count} votes

Accepted answer
  1. Aholic Liang-MSFT 13,886 Reputation points Microsoft External Staff
    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 “******@contoso.com” -AllRequestInPolicy $False -RequestInPolicy $users.smtpaddress
    

    Please use the following command to verify success:

    get-CalendarProcessing -identity "******@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 157.8K Reputation points MVP
    2023-05-23T17:47:02.4933333+00:00
    1 person found this answer helpful.
    0 comments No comments

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.