Quantcast
Channel: Practical 365
Viewing all articles
Browse latest Browse all 520

Output a List of In-Policy Users for a Resource Mailbox Using PowerShell

$
0
0

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

This article Output a List of In-Policy Users for a Resource Mailbox Using PowerShell is © 2014 ExchangeServerPro.com

Get more Exchange Server tips at ExchangeServerPro.com


Viewing all articles
Browse latest Browse all 520

Trending Articles