Deepin
asked on
Exchange export to CSV does not populate all feilds
Following command will not populate 'TotalitemSizesMB'
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, IssueWarningQuota, ProhibitSendQuota, @{label="TotalItemSize(MB) ";expressi on={(Get-M ailboxStat istics $_).TotalItemSize.Value.To MB()}}, @{label="ItemCount";expres sion={(Get -MailboxSt atistics $_).ItemCount}}, Database | Export-Csv "C:\UserMailboxSizes.csv" -NoTypeInformation
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, IssueWarningQuota, ProhibitSendQuota, @{label="TotalItemSize(MB)
ASKER
Just tried replacing with the line you mentioned - see full command below . Same result
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, IssueWarningQuota, ProhibitSendQuota, @{Label="TotalItemSize";Ex pression={ $MBXSize = Get-Mailboxstatistics $_.Name; $MBXSize.totalItemSize.val ue.toMB()} }, @{label="ItemCount";expres sion={(Get -MailboxSt atistics $_).ItemCount}}, Database | Export-Csv "C:\UserMailboxSizes.csv" -NoTypeInformation
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, IssueWarningQuota, ProhibitSendQuota, @{Label="TotalItemSize";Ex
That's odd - I just ran your original script and its populating fine for me...
Is the field empty or not what your were expecting???
Is the field empty or not what your were expecting???
ASKER
the fields empty both Total Item sizes and Item Count, I've tried that particular script on two server - both with the same out come
both on Exchange 2010
both on Exchange 2010
On both versions of the script, I got both fields populated... this is with 2010 as well.
Sorry Deepin... as far as I can see everything works as expected...
Where are you running the script? in powershell with the E2010 add-in or in the EMS?? or Powershell ISE???
Sorry Deepin... as far as I can see everything works as expected...
Where are you running the script? in powershell with the E2010 add-in or in the EMS?? or Powershell ISE???
ASKER
hmmmm.....Exchange management Console
One thing to remember, if the TotalitemSizes of mailbox is less than 1 MB, then this script will not report.
You can run this command to check this
Get-mailbox -resultsize 20 | Get-MailboxStatistics | fl TotalItemSize
And I can be sure that there is no problem with this command.
You can run this command to check this
Get-mailbox -resultsize 20 | Get-MailboxStatistics | fl TotalItemSize
And I can be sure that there is no problem with this command.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Brilliant!! what works from Admin Powershell but not from EMC
thanks for your help
thanks for your help
Open in new window