We help IT Professionals succeed at work.

Select SamAccountName - powershell script

245 Views
Last Modified: 2018-02-02
Hi All,

I have written the code below and it will not display the SamAccountName, please help!

get-mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.TotalItemSize -ge "4GB"} | Select-Object @{Name="DisplayName1";Expression={Get-Mailbox $_ | select -ExpandProperty SamAccountName}}, TotalItemSize, ItemCount, Database, TotalDeletedItemSize,DeletedItemCount, LastLoggedOnUserAccount, LastLogonTime, LastLogoffTime

Open in new window

Comment
Watch Question

Senior Systems Administrator
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Kelly GarciaSenior Systems Administrator

Author

Commented:
this works