How to pipe Get-MailboxStatistics and Get-Mailbox

HI,
 I have two commands but i need following information in one report.
 Ex:
Name
ForwardingAddress
DeliverToMailboxAndForward
 Get-Mailbox -Filter {ForwardingAddress -ne $null} | ft Name,ForwardingAddress,DeliverToMailboxAndForward -Autosize
 How do i get that lastlogontime to above by conbine following command
get-mailboxstatistics
select-object
Lastlogontime,
As

Hi ,
Try this :
Get-Mailbox -resultsize unlimited |where{$_.forwardingAddress -ne $null} |ft name,forwardingAddress,DeliverToMailboxAndForward
for  get-mailboxStatistics  ,first check  the all object member and properties of by using below
Get-mailboxstatistics  <anymailboxName>|get-member
if you see the ,ForwardingAddress,DeliverToMailboxAndForward  properties , then you can pipe these two with  Get-mailboxstatistics .
If so ,
Get-Mailbox -resultsize unlimited |where{$_.forwardingAddress -ne $null} |get-MailboxStatistics |ft name,forwardingAddress,DeliverToMailboxAndForward,lastlogontime
if not ,
You  can't pipe these two with Get-mailboxstatistics along with lastlogontime.
Then ,
you have to use  get-mailboxStatistics -resultsize unlimited|ft name,lastlogontime
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

Similar Messages

  • How to recover address book and all mailbox data

    How to recover address book and all mailbox data, from mounted drive that had OS10.4.11 now has bad blocks, and is not boot-able.
    Any help would be appreciated.... hermann

    The drive is mounted (appears as a drive on the desktop)? You can't just copy the files, or is it not really mounted?
    It would help to have more details on the status of this drive since I am obviously confused as to whether or not it is mounted and appears on the desktop. Is this an internal or external drive? If internal, how are you booting your computer now?
    There are data recovery tools such as [Data Rescue II|http://www.prosofteng.com/products/data_rescue.php] or [FileSalvage|http://subrosasoft.com/OSXSoftware/index.php?mainpage=product_info&productsid=1]. Both have free trial versions that let you see if the software will help before you decide to buy. You will also need a second hard drive equal to or larger in size than your first drive as a destination drive for recovered files. If the critical files are located on the bad blocks then there isn't much hope other than to send the drive out to a professional data recovery service which could cost $1000.
    The easiest way to recover the files is to get them off a backup drive.

  • How to use get-mailbox -Identity to select or target multipul users.

    When I use this statement, the command executes just fine, and all is while.
    Get-Mailbox user1 | Search-Mailbox -SearchQuery 'Attachment:"Query1"' -targetmailbox "admin" -targetfolder "test" -searchdumpster -loglevel full
    what also works is this:
    Get-Mailbox -Server Server1 | Search-Mailbox -SearchQuery 'Attachment:"Query1"' -targetmailbox "admin" -targetfolder "test" -searchdumpster -loglevel full }
    However I need to target about 10 user mailboxes for this search (and larger a delete\purge) I'd rather not run the same command 10times just changing the user name, is there a way to put that all on one search command?

    Run your command like this:
    "User1","User2","User3","User4","User5","User6","User7","User8","User9","User10" | Get-Mailbox | Sort Name |
    Search-Mailbox -SearchQuery
    'Attachment:"Query1"' -targetmailbox
    "admin" -targetfolder
    "test" -searchdumpster
    -loglevel full
    That will iterate through each mailbox individually.  You can also put all the names into a txt file (one alias to a row) and use
    Get-Content <filename> instead of the list of aliases - that makes it simpler to update your list.
    Get-Content <filename> | Get-Mailbox | Sort Name | Search-Mailbox
    -SearchQuery 'Attachment:"Query1"'
    -targetmailbox "admin"
    -targetfolder "test"
    -searchdumpster -loglevel full

  • Combining Get-Mailbox | Get-MailboxStatistics

    I want to list out Get-Mailbox | select userprincipalname | Get-MailboxStatistics | select TotalItemSize but it returned error.
    "The input object cannot be bound to any parameters for the command either because the command does not take pipeline in
    put or the input and its properties do not match any of the parameters that take pipeline input."
    How can I get mailbox totalitemsize by email address?

    I know you can pipe Get-Mailbox username | Get-MailboxStatistics..., so try Get-Mailbox | Get-MailboxStatistics... I suspect that by using Select-Object you're returning a property that Get-MailboxStatics can't do bind to any of its parameters.

  • How do you get the mail boxes set up on your Bt yahoo safari account on to the apple e.mail app on an I pad mini?

    How do you get mailboxes set up on Bt yahoo in safari onto your apple e.mail app?

    When you say Mailboxes, do you mean actual folders or the overall setting up of Yahoo mail on iPad?  If overall setup then when you select Mail it should show some email suppliers, I believe Yahoo should be listed, if you select it, it should then ask for you details.
    If you mean folders, if Yahoo is IMAP based if you create folders online via webmail, they should pull through to your iPad when the account has been set up.
    Alternatively, if you have got mail up and running on your iPad and want a new folder, just select your account under the Accounts heading in Mail you should see a list of all the folders present, click EDIT in at the top of the screen, just to the right of where it is likely to say either Yahoo or BT and it will then give you the option to add a mailbox(FOLDER) at the bottom of the screen.
    Steve

  • I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone an i have internet and all other functions working on my computer

    I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone and i have internet and all other functions working on my computer

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports (not "Diagnostic and Usage Messages") for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents—the text, not a screenshot. I know the report is long. Please post all of it anyway.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • How can I get my bookmarks and mailboxes off my old iBook G4 that crashed?

    My OS crashed. I reinstalled it, but still could not access anything. I took the computer to a repair person. He created a new account and retrieved everything I had on my desktop, but not my mailboxes or bookmarks. He said there is a way to do that, but it would be very expensive for me to have him do it. He said I could come here and find out. So here I am.
    I can get online and to the desktop of this new account, but that's all. How can I get that stuff? I need it very badly.......
    It was an iBook G4 14" with 10.4.11.
    Thanks!

    Here is what macjack has offered:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh2316.html
    Hope it works!

  • I always have trouble with my mailbox. It is always asking for my passwords but everything has been verified. How can I get it to stop doing it and start working????

    I always have trouble with my mailbox. It is always asking for my passwords but everything has been verified. How can I get it to stop doing it and start working????

    There is only one thing that happens -- the Server does not respond.
    Your mac concludes that you must have entered the wrong password. That may happen once, but then other issues become more likely, and it keeps asking for a new password.
    Sometimes the Server is down for maintenance. Sometimes something is configured wrong. Some services do this on purpose to get you to use WebMail (pick up your Mail with your Browser) so they can show you some ads.

  • "Reply" and "Forward" and "Move" have disappeared rom my email, so I have to go into "mailbox" in the top bar.   How can I get them back?

    "Reply" and "Forward" and "Move" have disappeared rom my email, so I have to go into "mailbox" in the top bar.   How can I get them back?

    under the "view" menu open custimixze toolbar.  Then drag those from that list back up to your tool bar.   

  • Get a report joining data from Get-MailBox and Get-MailBoxStatistics

    Hi
    I have 2 cmdlets, and every has different information of the same users, the point is that I have to get the information of every cmdlet  and in excel I have to join the information
    Is there a way to get both information joined in one shot?
    This is one cmdlet:
    Get-Mailbox -Server MB05 | Select-Object DisplayName,SamAccountName,UserPrincipalName,UseDatabaseRetentionDefaults,OrganizationalUnit,PrimarySmtpAddress,WhenCreated,WhenChanged,HiddenFromAddressListsEnabled,@{N="AddressListMembership";E={
    $_.AddressListMembership -JOIN ';'}},UseDatabaseQuotaDefaults,ForwardingAddress,DeliverToMailboxAndForward,RecipientLimits,ManagedFolderMailboxPolicy,@{N="GrantSendOnBehalfTo";E={ $_.GrantSendOnBehalfTo -JOIN ';'}},MaxSendSize,MaxReceiveSize,Database
    | Export-CSV -Path d:\ms\mb05.txt -Delimiter "`t"  -Encoding Unicode -NoTypeInformation
    This is the other cmdlet:
    Get-MailboxStatistics Server MB05| Select-Object DisplayName,Database,StorageLimitStatus,@{label="Total Size (MB)";expression={$_.TotalItemSize.Value.ToMB()}},@{label="Total Delete (MB)";expression={$_.TotalDeletedItemSize.Value.ToMB()}},
    ItemCount,DeletedItemCount,LastLogoffTime,@{label="ProhibitSendQ (MB)";expression={$PSQ}}| Export-CSV -Path d:\ms\ms05a.txt -Delimiter "`t" -Encoding Unicode -NoTypeInformation
    Thank you in advanced.
    Doc MX

    I think something like this would work:
    $stuff = @()
    Get-Mailbox -ResultSize unlimited -Database MB05| foreach{
    $x = "" | select `
    DisplayName, `
    SamAccountName, `
    UserPrincipalName, `
    UseDatabaseRetentionDefaults, `
    OrganizationalUnit, `
    PrimarySmtpAddress, `
    WhenCreated, `
    WhenChanged, `
    HiddenFromAddressListsEnabled, `
    AddressListMembership, `
    UseDatabaseQuotaDefaults,
    ForwardingAddress, `
    DeliverToMailboxAndForward, `
    RecipientLimits, `
    ManagedFolderMailboxPolicy, `
    GrantSendOnBehalfTo, `
    MaxSendSize, `
    MaxReceiveSize, `
    Database, `
    StorageLimitStatus, `
    'Total Size (MB)', `
    'Total Delete (MB)', `
    ItemCount, `
    DeletedItemCount, `
    LastLogoffTime, `
    'ProhibitSendQ (MB)'
    $m = Get-Mailbox $_
    $x.DisplayName = $m.Displayname,
    $x.SamAccountName = $m.SamAccountName,
    etc.,
    etc.,
    etc.
    $m = Get-MailboxStatistics $_
    $x.StorageLimitStatus = $m.StorageLimitStatus,
    $x.'Total Size (MB)' = $m.TotalItemSize.Value.ToMB(),
    etc.,
    etc.,
    etc.
    $stuff += $x
    $stuff | export-csv -Path d:\ms\mb05.txt -Delimiter "`t" -Encoding Unicode -NoTypeInformation
    --- Rich Matheisen MCSE&I, Exchange MVP

  • How do I get my (30+) OSX archived Apple Mailboxes and old emails to appear on my iPhone?

    How do I get my (30+) OSX archived Apple Mailboxes to appear on my iPhone? I am happy to use any combination of Thunderbird and Apples so that I can sort and archive incoming emails into existing folder (names), and access old emails (1,000s of them) that are only on my iMac now.

    First off Thunderbird does not have a version for iPhone so you need to ask the Apple genius how to work your phone. Secondly most mobile devices will not have enough storage for thousands of messages.
    Your best solution is to setup IMAP email accounts. IMAP was developed just for this use. The messages are stored on the email providers server and you access and manage them from your computer and mobile devices.

  • I have upgraded to Mac OS X v10.7 Lion and when I log into mail I can't find my mailboxes other than inbox, draft and sent how do I get my other mailboxes back?

    I have upgraded to Mac OS X v10.7 Lion and when I log into mail I can't find my mailboxes other than inbox, draft and sent how do I get my other mailboxes back?

    Lion is a bit of a memory hog - kernel_task will use quite a bit and Safari is known to use more; you can't do anything about the system, but changing to Firefox may help a little. The best way to deal with it is to increase your RAM; the required minimum is just that: the minimum. My Macbook would keep crashing and beachballing until I upped the RAM to 4 GB. RAM is inexpensive right now - check out OWC (macsales.com) or Crucial.com; both reputable RAM vendors with lifetime warranties. You won't regret it.
    As for iDVD - I purchased the retail iLife 11 disk because of iDVD (because I use that a lot) - it's available at online resellers, the Apple Store, and ebay.

  • Pipeline get-mailbox and get-mailboxstatistics

    Dears,
    I am finding great difficulty in having output what seems to be a quite simple...
    I just need to output all user's mailbox prohibitsendquota and the totalitemsize and I am running the below command but it is giving me null values in totalitemsize,
    Get-Mailbox -ResultSize Unlimited  | Select-Object DisplayName, ProhibitSendQuota, @{label="TotalItemSize";expression={(Get-MailboxStatistics $_name).TotalItemSize}}
    However, when I make get-mailbox -identity
    [email protected] it gives me the correct output...I need to run it for everyone.
    MCP,MCTS(Vista),MCSA(Messaging)

    .. i noticed that too, but chaning $_name to $_.name  still doesnt work - it gives me totalitemsize only on the last subject
    However, i have a script i use (not one-liner though) - giving me way more information
    $mailboxes = get-mailbox -database $(read-host "enter database") |select -first 10 | select name,alias,database
    $Mycol = @()
    foreach ($mbx in $mailboxes)
    $mbxstat = get-mailboxstatistics $mbx.name |select lastlogontime,lastloggedonuseraccount,totalitemsize,itemcount
    $user = get-aduser $mbx.name -properties enabled,lastlogondate
    $MyObject = New-Object PSObject -Property @{
    mbxName = $mbx.name
    mbxAlias = $mbx.alias
    mbxDatabase = $mbx.database
    ADuser = $user.enabled
    ADuserLogon = $user.lastlogondate
    mbxLastlogon = $mbxstat.lastlogontime
    mbxLastAccount = $mbxstat.lastloggedonuseraccount
    mbxItemSize = $mbxstat.totalitemsize
    mbxCount = $mbxstat.itemcount
    $Mycol += $MyObject
    $Mycol |select mbxname,mbxalias,mbxdatabase,aduser,aduserlogon,mbxlastlogon,mbxlastaccount,mbxitemsize,mbxcount #|export-csv report.csv -Delimiter ";"
    just delete rows u dont need

  • I saved a vital mailbox but it is now encrypted - how and how to I get it in a readable format?

    I am using a Mac OX10 with Mountain Lion.  I saved a vital mailbox to an original document file but it turned out encrypted.  How can I get it into normal format? why did this happen?

    Still mainly gobbledegook though not all of it, can read some but little. here is the screen shot.

  • I have an IMAP mailbox that seems to only show mail 7 days old on my iMac running Snow Leopard.However, all old emails that I have not deleted are showing up on my macbook pro running the next OS (Lion?).  How do I get all my old emails back on my iMac?

    I have an IMAP mailbox that seems to only show mail 7 days on my iMac running Snow Leopard.  However, on my MacBook Pro I can see all old mail that I have not deleted.  It is running the next operating system (Lion?).  Does anyone know how I can get all my old mail back on my iMac.  It is my primary computer and I need some of those old messages.  I have tried to rebuild the mailbox but it has not done anything.

    I have tried to rebuild the mailbox to no avail.  The mailbox behavior says:  Drafts (not checked) store draft messages on the server, Notes (checked) show not in Inbox, Sent (checked) Store sent messages on the server Delete sent messages when (option never selected), Junt (not checked) store junk messages on the server Delete junk messages when (option never selected), Trash (checked) moves deleted messages to the Trash mailbox and (checked)  store deleted messages on the server Permanently erase deleted messages when (one month old option selected).
    I have not set up any rules that I know of other than a signature, in the very least I have not changed any.

Maybe you are looking for

  • Power on light (led) with 23" cinema hd ?

    hi, i am used to the "old" apple monitors where there is always a power on light visible. my new cinema 23" display has only - for a small second - light on when starting up and shutting down. is this normal behaviour ? tia

  • Email submit in PDF not XML

    Hi, I need to create a PDF fillable form that will send a filled pdf version to an email on submit. The ones we have tried so far send an xml version of the form instead of the filled pdf version. Also, is it possible to leave the email recipient emp

  • Prividers Not working exception thrown

    We are using Baltimore Providers for security . While it workd fine in applet viewr / application , I failed to make it run in browser (IE 6) with jre 1.4.2 . What may go wrong ? We used digital signature for data signning . Any help or pointers will

  • Acrobat ClearScan + Preview.app

    Hello all, I am using Adobe Acrobat X to vectorize characters in scanned books with Adobe's ClearScan technology which produces a custom font set for each PDF. ClearScanned PDFs are greatly beautiful and light, and Preview.app can open them properly.

  • [SOLVED] Asus P8P67 Pro motherboard missing eth0

    Hey everyone I'm setting up my new box and haven't got very far, this has to be the first time Arch hasn't automatically loaded the network driver on one of my boxes. As the title suggests, I have an Asus P8P67 Pro (Sandybridge) which has some intel