Awesome Seth,
This did it for me, thanks!
$mbox = Get-Mailbox -resultsize unlimited | get-mailboxstatistics
$mbox | select
DisplayName,TotalItemSize,ItemCount,StorageLimitStatus,LastLogonTime,@{Name="Office";
Expression={ (Get-User $_.LegacyDN).Office }} | Export-csv MBX_office.CSV
-NoType
-----Original Message-----
From: Wright, Seth - wrightst [mailto:[email protected]]
Sent: Tuesday, November 15, 2011 2:39 PM
To: MS-Exchange Admin Issues
Subject: Re: PS Question
$mbox = Get-Mailbox wrightst
$mbox | select
DisplayName,TotalItemSize,ItemCount,StorageLimitStatus,LastLogonTime,@{Name="Office";
Expression={ (Get-User $_.LegacyDN).Office }}
DisplayName : Wright, Seth - wrightst
TotalItemSize : 566.1 MB (593,627,788 bytes)
ItemCount : 37861
StorageLimitStatus : BelowLimit
LastLogonTime : 11/15/2011 2:33:20 PM
Office : MASS 121
For what it's worth, "Get-Mailbox -ResultSize Unlimited" should give you all
mailboxes--in other words, you shouldn't have to use Get-MailboxServer in that
command.
---
Seth
On Nov 15, 2011, at 2:25 PM, <[email protected]>
<[email protected]> wrote:
> Ok to ask a different question in this thread?:)
>
>
>
>
> $getmbx= get-mailboxserver | get-mailbox -ResultSize Unlimited |
> get-MailboxStatistics $getmbx | select
> DisplayName,TotalItemSize,Itemcount,StorageLimitStatus,LastLogonTime |
> where {($_.totalItemSize -gt 10)} | sort-object TotalItemSize |
> Export-csv MBX_Size.CSV -NoType
>
> In a ps.1 the above returns the following for all mailboxes
>
> DisplayName TotalItemSize
> ItemCount StorageLimitStatus LastLogonTime
> DM Support Ad Ops 8.882 GB (9,536,684,579 bytes) 24424
> BelowLimit 11/15/2011 13:08
>
>
> but what I'm trying to do is get the AD attribute "Office" into the
> spreadsheet. I know it's not a part of MailboxStatistics , maybe I'm too
> focused on using the above, but I sure am havening a problem trying to get my
> head around an answer.
>
> /Going to be going through a big change in our retention policies and need to
> send out different notifications to different groups...
>
>
>
> -----Original Message-----
> From: Wright, Seth - wrightst [mailto:[email protected]]
> Sent: Tuesday, November 15, 2011 1:43 PM
> To: MS-Exchange Admin Issues
> Subject: Re: PS Question
>
> Something like this?
>
>
>
> $users = Get-Mailbox -Identity wrightst foreach ($user in $users) {
> $folderCount = (Get-MailboxFolderStatistics -Identity $user).Count
> Write-Host "Number of folders = $folderCount for user $user"
> }
>
>
> Number of folders = 65 for user wrightst
>
>
> ---
> seth wright ([email protected])
> lead exchange administrator
> 540.568.2912 (office)
> james madison university
>
>
>
>
> On Nov 15, 2011, at 1:31 PM, Cameron wrote:
>
>> Good afternoon all,
>> I'm trying to get the number of folders that a user has in their
>> mailbox. I've tried get--mailboxfolderstatistics -identity "domain\user
>> name" and it returns all the folders in the mailbox. What I would actually
>> like returned is Number of folders = x for that user.
>>
>> My google-fu is weak today.
>>
>> TIA
>> Cameron
>>
>> ---
>> To manage subscriptions click here:
>> http://lyris.sunbelt-software.com/read/my_forums/
>> or send an email to [email protected]
>> with the body: unsubscribe exchangelist
>>
>
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe exchangelist
>
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe exchangelist
>
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe exchangelist
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe exchangelist