Forum Discussion
Zeff Wheelock
Feb 28, 2018Iron Contributor
Get-MobileDeviceStatistics Issue
Greetings,
Can someone explain if I do a:
Get-Mailbox -Identity joeSmith@domain.com I get a result
Get-MobileDeviceStatistics -mailbox joesmith@domain.com I get a result
but
Get-Mailbox...
VasilMichev
Mar 01, 2018MVP
You are not using the correct syntax. Try this:
Get-Mailbox vasil | % { Get-MobileDeviceStatistics -Mailbox $_.UserPrincipalName }
- Zeff WheelockMar 01, 2018Iron Contributor
Ah! So you do need a foreach statement even though you are only pulling one object. Makes.... sense.... I guess. Me, being logical (my fault), would have thought foreach would loop 2 or more objects. Silly me.