user2920399
user2920399

Reputation: 1

Power Shell Output Re-Filter | Get-CalendarProcessing

I'm trying to write a script that shows resource delegates in Outlook 2010 mailboxes. The code for this is:

input > Get-CalendarProcessing -Identity $Alias | where {$_.ResourceDelegates -ne "{}"} | ft *

The output important to me is the Resource and Mailbox identity.

ResourceDelegates                   : {TEST/A/A Usr, TEST/A/Kelly Besant, TEST/A/A Usr,
Identity                            : TEST/A/A Usr

I need the names in a standard format and not in the canonical format, how can I convert them?

Upvotes: 0

Views: 2849

Answers (2)

Shay Levy
Shay Levy

Reputation: 126902

Each ResourceDelegates or Identity object has a name property (EMS required):

$Identity = @{n='Identity';e={$_.Identity.Name}}
$ResourceDelegates = @{n='ResourceDelegates';e={$_.ResourceDelegates | foreach {$_.Name}}}
Get-CalendarProcessing $alias| Select-Object $Identity,$ResourceDelegates

Upvotes: 1

mjolinor
mjolinor

Reputation: 68341

You can use the canonical name with get-recipeint to resolve to Name, DisplayName, or DN:

Get-CalendarProcessing -Identity $Alias |
 where {$_.ResourceDelegates -ne "{}"} | 
 select -ExpandProperty ResourceDelegates |
 get-recipient |
 select -ExpandProperty Name

Upvotes: 1

Related Questions