Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Get value from higher pipe level

$
0
0

Hello Riley,

Here a modified variant of your first post which will add the mailbox name to the object returned by Get-MobileDeviceStatistics using the Add-Member cmdlet (a trick I've learned at the PowerShell Summit 2014 earlier this year).

Get-CASMailbox -Filter { hasactivesyncdevicepartnership -eq $true -and -not displayname -like "CAS_{*" } | Get-Mailbox | ForEach-Object -Process { Get-MobileDeviceStatistics -Mailbox $_ | Add-Member -MemberType NoteProperty -Name MailboxName -Value $_.Name -PassThru } | Select-Object -Property MailboxName, DeviceModel, LastSuccessSync

Regards,
Daniel


Viewing all articles
Browse latest Browse all 13067

Trending Articles