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.
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
$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
}
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
}
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?
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
Are you running the command in the Exchange Management Shell?
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.
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
If the mailboxes are in Exchange Online you will need to connect to Exchange Online with PowerShell, not to Azure AD.
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.
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.
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
Would you like to share the post
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
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
I don’t have access to your system so its hard for me to understand what you’re asking here. What are you expecting to see? The command works fine for me and shows the legacyExchangeDn of the mailbox users who are in the Bookinpolicy for my room mailbox.
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.
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
If you look at the legacydn attribute for those users, does it show the full name at the end of the string?
Could you advise me on how to look at the legacydn?
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
It’s a mailbox property. Get-Mailbox will show it to you.
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
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
Pipe to Format-List
e.g.
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}
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.
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.
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
If you think it’s a bug and you can repro it on the latest CU, open a Microsoft case and see if they can get it fixed for you.
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.
Have you found a solution to this? Having the same issue, cannot audit for rights to bookinpolicy or requestoutofpolicy. on CU13
Hello, also encountered this issue. May I know if this has been fixed?
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.
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 }
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 }
Great you saved my day !
instead of alias I use DisplayName
Have this changed?! It is not working 🙁
The Real Person!
Author Paul Cunningham acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.
Try this:
Get-CalendarProcessing “HO Meeting Room 1” | select -expandproperty:bookinpolicy
Still Not Working
Use this.
((Get-calendarprocessing <>).bookinpolicy | Get-recipient ).PrimarySMTPAddress
Example:
((Get-calendarprocessing H3060@mydomain.com).bookinpolicy | Get-recipient ).PrimarySMTPAddress
I love that. It gives me just what I need, without chopping it off.
Hi Paul
How do you get a list of all meeting rooms that currently use the In-policy or out-policy?
Spot on answer Thanks 🙂