Ricky asks:

How do you export a copy of the list of users in the resource in policy tab?

What Ricky is referring to are calendar processing settings, often used on room and equipment mailboxes, that can be used to control who can do such things as make booking requests for a meeting room.

For example, this meeting room has a list of users who are allowed to submit in-policy requests that will be automatically approved.

exchange-inpolicy-requests

We can use Get-CalendarProcessing to query the setting with the Exchange Management Shell.

[PS] C:\>Get-CalendarProcessing "HO Meeting Room 1" | fl bookinpolicy

BookInPolicy : {exchangeserverpro.net/Company/Head Office/Users/Aleisha.Harrison, exchangeserverpro.net/Company/Head Of
               fice/Users/David.Gower, exchangeserverpro.net/Company/Head Office/Users/Fran.Durrant}

The formatting of that output is not very useful though, if we’re trying to export a list of the users.

Instead, we can pipe to Select-Object.

[PS] C:\>Get-CalendarProcessing "HO Meeting Room 1" | Select-Object -ExpandProperty:bookinpolicy

IsDeleted         : False
Rdn               : CN=Aleisha.Harrison
Parent            : exchangeserverpro.net/Company/Head Office/Users
Depth             : 5
DistinguishedName : CN=Aleisha.Harrison,OU=Users,OU=Head Office,OU=Company,DC=exchangeserverpro,DC=net
IsRelativeDn      : False
DomainId          : exchangeserverpro.net
ObjectGuid        : 9d3378be-7985-4932-b580-fe3057f00a6b
Name              : Aleisha.Harrison

IsDeleted         : False
Rdn               : CN=David.Gower
Parent            : exchangeserverpro.net/Company/Head Office/Users
Depth             : 5
DistinguishedName : CN=David.Gower,OU=Users,OU=Head Office,OU=Company,DC=exchangeserverpro,DC=net
IsRelativeDn      : False
DomainId          : exchangeserverpro.net
ObjectGuid        : 8a37caa8-cbfe-4c9c-92ff-40d44b4890df
Name              : David.Gower

IsDeleted         : False
Rdn               : CN=Fran.Durrant
Parent            : exchangeserverpro.net/Company/Head Office/Users
Depth             : 5
DistinguishedName : CN=Fran.Durrant,OU=Users,OU=Head Office,OU=Company,DC=exchangeserverpro,DC=net
IsRelativeDn      : False
DomainId          : exchangeserverpro.net
ObjectGuid        : c2516789-67cf-48b0-9cb0-fa02eb541ca8
Name              : Fran.Durrant

Still, that is more output than we really want in this situation. So instead I would run this command to see a nice, neat list of the users.

[PS] C:\>Get-CalendarProcessing "HO Meeting Room 1" | Select-Object -ExpandProperty:bookinpolicy | Select Name

Name
----
Aleisha.Harrison
David.Gower
Fran.Durrant

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. dp

    $resourceIdentity = “YourResuorceMailboxEmailAddress”
    try
    {
    (Get-CalendarProcessing -Identity $resourceIdentity).Bookinpolicy | Get-user -ErrorAction SilentlyContinue | ft -AutoSize
    }
    finally
    {
    (Get-CalendarProcessing -Identity $resourceIdentity).Bookinpolicy | Get-Group -ErrorAction SilentlyContinue | select name,recipienttype | ft
    }

    1. Michel Van Delden

      Thanks for you comment that was exactly what I was looking for.
      I personally was only curious about actual users so I expanded on your group output.

      $resourceIdentity = Read-Host
      try
      {
      (Get-CalendarProcessing -Identity $resourceIdentity).Bookinpolicy | Get-user -ErrorAction SilentlyContinue | ft name -AutoSize
      }
      finally
      {
      (Get-CalendarProcessing -Identity $resourceIdentity).Bookinpolicy | Get-Group -ErrorAction SilentlyContinue |% {Get-DistributionGroupMember $_.identity}| select name | ft
      }

  2. Emily

    First of all, thank you! This is very informational and does, for the most part, get me what I need.

    However, piping Select Name produces a list of nothing for me. Just 7 rows of blank (like the field is blank on the user record or something). Without that, I do get the correct results, they’re just ugly and using format-list doesn’t change how it is shown. I also tried Alias and DisplayName (instead of Name along with Select) but received the same results. We are using O365 hybrid. Any ideas?

      1. Emily

        I’m using Azure AD Powershell connecting to O365. EMS run from the on prem Exchange server cannot see the resources since they no longer live there.

          1. Emily

            I apologize that I wasn’t clear. I’m using Powershell w the Azure AD module loaded (often required for O365) to connect to Exchange Online.

  3. Greg

    Thanks Paul. I actually discovered (through one of your other posts) a way to get the info I needed. It’s exactly what we were looking for. Thank you again.

    1. Rhys

      What was the post or command used to get this info?

      I am having the same issue with bookinpolicy returning truncated values. When I pipe this to “| Select Name” it returns blank lines.
      I checked one of the mailboxes and legacydn property has the same truncated value

    2. Ashish Bhat

      Would you like to share the post

  4. Greg

    Tried that, here is the output. Same results, different format.

    Get-CalendarProcessing “Conf Rm (Webinar Studio)” | Select-Object -ExpandProperty:bookinpolicy | Format-List
    /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=47ad2662a8ac4c80b4bacb16db1eac48-Ricky Rober
    /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=25f8646437d94061999a064b308a05c0-Eric Anthon
    /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=15d4db8f8cae4a11854ae881869c88e2-Bill Willia

      1. Greg

        I understand that. I guess I’d like to see full names, not cut off versions.

        Ricky Rober -> Ricky Roberts
        Eric Anthon -> Eric Anthony
        Bill Willia -> Bill Williams.

        I’m glad it’s working for you though.

          1. Greg

            Could you advise me on how to look at the legacydn?

  5. Greg

    When running this my results are cut off. Any idea how this can be resolved?
    Notice the Names, Becky Jone vs Becky Jones. These are example names only.

    Get-CalendarProcessing “HO Meeting Room 1” | Select-Object -ExpandProperty:bookinpolicy

    PS C:\windows\system32> Get-CalendarProcessing “Conf Rm 3 (Webinar Studio)” | Select-Object -ExpandProperty:bookinpolicy
    /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=47ad2662a8ac4c80b4bacb16db1eac48-Ricky Rober
    /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=25f8646437d94061999a064b308a05c0-Eric Anthon
    /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=29587308c56e4c4285cb7e00143a78fd-Becky Jone
    /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=15d4db8f8cae4a11854ae881869c88e2-Bill Willia

  6. Shawn

    This works if there is only a single group assigned to bookinpolicy

    $Proxy = “x500:” + (Get-CalendarProcessing -Identity “roomname” | Select -expand BookInPolicy)
    Get-ADGroup -Filter {proxyAddresses -Like $Proxy}

  7. Aamir

    Do you have any idea how to remove one user which is added in Bookinpolicy?

    I can add one without affecting others but not able to remove.

  8. PK

    We have the same problem with Exchange 2013, been problem since CU6.
    If we add users or groups to BookInPolicy, the users and groups have the the booking rights but when we try to check value of BookInPolicy, Select-Object -ExpandProperty:bookinpolicy or Select-Object -ExpandProperty bookinpolicy returns nothing. To mix things a little more, all users/groups that were assigned prior CU6 shows up in the BookInPolicy but users and groups that were added after CU6 was installed doesn’t.

      1. PK

        We still have this problem in CU12. BookInPolicy stays empty (ie returns nothing with expandproperty) but users/groups that are added will have the proper rights. Checking who has the rights is p.i.t.a.

        1. Bryan Siler

          Have you found a solution to this? Having the same issue, cannot audit for rights to bookinpolicy or requestoutofpolicy. on CU13

          1. Kelvin Ryan

            Hello, also encountered this issue. May I know if this has been fixed?

  9. Koen

    dear,

    I’ve been trying your approach yet, it only works when the bookinpolicy had users assigned to it. When a group is assigned, I seem to be unable to retrieve the correct groupname.
    can you please assist me?

    rgd

    K.

  10. Rikard Strand

    I did not get it to work either. But this did it for me (extracting Alias):
    foreach ( $x in (Get-CalendarProcessing “*room*” | Select-Object -ExpandProperty:bookinpolicy) ) { get-mailbox $x | select -ExpandProperty:alias }

    1. Chris P

      if you do get-recipient instead of get-mailbox, you can also extract the alias if a group is assigned:

      foreach ( $x in (Get-CalendarProcessing “podcast_room_2gp-4” | Select-Object -ExpandProperty:bookinpolicy) ) { get-recipient $x | select -ExpandProperty:alias }

      1. Guillaume

        Great you saved my day !
        instead of alias I use DisplayName

  11. Evan Camilleri

    Have this changed?! It is not working 🙁

      1. Ashish Bhat

        Still Not Working

        1. Brijesh Choudhary

          Use this.

          ((Get-calendarprocessing <>).bookinpolicy | Get-recipient ).PrimarySMTPAddress

          Example:

          ((Get-calendarprocessing H3060@mydomain.com).bookinpolicy | Get-recipient ).PrimarySMTPAddress

          1. Margaret Auld-Louie

            I love that. It gives me just what I need, without chopping it off.

  12. Deanne Barton

    Hi Paul

    How do you get a list of all meeting rooms that currently use the In-policy or out-policy?

  13. Ricky O'Brien

    Spot on answer Thanks 🙂

Leave a Reply