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

Similar Messages

  • 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 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.

  • 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.

  • Speeding up the Get-MailboxStatistics cmdlet for ~19K mailboxes.

    Greetings,
    While this is partially a PowerShell scripting question, I am posting it in the Exchange 2010 forum because the issues I believe center around the Get-MailboxStatistics itself, and the speed of my scripts in Exchange 2010 (possibly
    due to the additional overhead in remote PowerShelling).
    In my Exchange 2010 system we have ~19,000 mailboxes spread accross multiple DAG nodes, and ever since we upgraded from Exchange 2007 to Exchange 2010, gathering all of the mailboxes and then gathering their statistics takes almost
    twice as long. For example a script that used to take ~45 minutes in Exchange 2007, takes about an hour and a ½.
    The issue I am running into when clocking core aspects of a mailbox data gathering scripts is that the Get-MailboxStatistics seems to be taking an excessively long period of time, and I am hoping someone can help me figure out a
    way to speed up the process.
    For example this is a boiled down script I created, where I ripped out a ton of other things and just focused on the Get-Mailbox and Get-MailboxStatistics commands:
    $BaseOU
    =
    "Customers"
    # Capture the date and time in a variable using the "Fri 11/01/2010 6:00 AM" format.
    $DateTime
    =
    Get-Date
    -Format
    "ddd MM/dd/yyyy h:mm tt"
    # Select a single domain controller to use for all the queries (to avoid mid AD replication inconsistencies)
    from the environment variable LOGONSERVER - this ensures the variable will always be dynamically updated.
    $DomainController
    = ($Env:LogonServer).Substring(2)
    # Set the loop count to 0 so it can be used to track the percentage of completion.
    $LoopCount
    = 0
    # Start tracking the time this script takes to run.
    $StopWatch1
    =
    New-Object
    System.Diagnostics.Stopwatch
    $StopWatch1.Start()
    # Get the mailbox info for all IHS customer mailboxes.the storage limit is Prohibit send or mailbox disabled
    Write-Host
    -ForegroundColor
    Green
    "Beginning mailbox gathering. In a short while a progress bar will appear."
    $GatheredMailboxes
    =
    Get-Mailbox
    -ResultSize:Unlimited
    -OrganizationalUnit
    "ADDomain.com/$BaseOU"
    -DomainController
    $DomainController |
    Select Identity,DisplayName,ProhibitSendQuota
    Write-Host
    -ForegroundColor
    Green
    "Mailbox data gathering is complete."
    $StopWatch1.Stop()
    $StopWatch2
    =
    New-Object
    System.Diagnostics.Stopwatch
    $StopWatch2.Start()
    Foreach ($Mailbox
    in
    $GatheredMailboxes) {
    # Show a status bar for progress while the mailbox data is collected.
    $PercentComplete
    = [Math]::Round(($LoopCount++
    $GatheredMailboxes.Count
    * 100),1)
    $CurrentMBDisplay
    =
    $Mailbox.DisplayName
    Write-Progress
    -Activity
    "Mailbox Data Gathering in Progress"
    -PercentComplete
    $PercentComplete
    `
    -Status
    "$PercentComplete% Complete"
    -CurrentOperation
    "Current Mailbox: $CurrentMBDisplay"
    #Get the mailbox statistics for each mailbox gathered above.
    $MailboxStats
    =
    Get-MailboxStatistics
    $Mailbox.Identity |
    Select StorageLimitStatus,TotalItemSize
    # Proceed only if the the mailbox statistics show the storage limit is Prohibit Send or Mailbox Disabled.
    # Write-Host "Stats for"$Mailbox.DisplayName"are Limit ="$MailboxStats.StorageLimitStatus"and Size ="$MailboxStats.TotalItemSize.Value.ToMB()"MB."
    # Calculate the amount of time the script took to run and write the information to the screen.
    $StopWatch2.Stop()
    $ElapsedTime
    =
    $StopWatch1.Elapsed
    Write-Host
    "he mailbox gathering took"
    $ElapsedTime.Hours
    "hours,"
    $ElapsedTime.Minutes
    "minutes, and"
    $ElapsedTime.Seconds
    `
    "seconds to run."
    $ElapsedTime
    =
    $StopWatch2.Elapsed
    Write-Host
    "The foreach loop took"
    $ElapsedTime.Hours
    "hours,"
    $ElapsedTime.Minutes
    "minutes, and"
    $ElapsedTime.Seconds
    `
    "seconds to run."
    Using the two stop clocks, I was able to see that the Get-Mailbox of all mailboxes took ~9 minutes. That isn’t lightning fast, but it isn’t unreasonable.
    The issue comes in where the Foreach loop with the Get-MailboxStatistics took ~53 minutes, and I am sure some of the mailbox data was cached on the servers from my various tests so it would probably take even longer with a cold
    run.
    I did some digging around and I really couldn’t find anything on how to speed up the Get-MailboxStatistics, and the only thing I found was this link:
    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/9ceefddd-7a59-44ec-8fc0-8de244acb58b
    However I am not clear on how moving the Get-MailboxStatistics into the Get-Mailbox syntax (which is odd to me in general) would speed things up if I still have to have a foreach loop to process the data a little bit and add the
    users to a datatable. That discussion also made think the foreach loop itself is slowing things down but unclear as to how/why if that is true. 
    Can someone help share some ideas on how to speed up this process? I think there are some other things I could try but I can’t think of them.
    Thank you in advance.

    I think it's impossible to speed up the Get-MailboxStatistics when it is being called for each and every mailbox individually.
    I read somewhere in other posts people were having better performance by calling the cmdlet against an entire database or server so I gave it a shot with this code:
    $DAGS = "EXCHDAG1"
    # Start tracking the time this script takes to run.
    $StopWatch = New-Object System.Diagnostics.Stopwatch
    $StopWatch.Start()
    $MailboxStatistics = New-Object System.Data.DataTable “MailboxStatistics”
    $MailboxStatistics.Columns.Add("TotalitemSize",[String]) | Out-Null
    $MailboxStatistics.Columns.Add("ItemCount",[String]) | Out-Null
    $MailboxStatistics.Columns.Add("LastLogonTime",[String]) | Out-Null
    $MailboxStatistics.Columns.Add("LastLogoffTime",[String]) | Out-Null
    $MailboxStatistics.Columns.Add("MailboxGUID",[String]) | Out-Null
    $MailboxStatistics.PrimaryKey = $MailboxStatistics.Columns["MailboxGUID"]
    ForEach ($DAGServer in (Get-DatabaseAvailabilityGroup $DAGS).Servers) {
    ForEach ($MailboxStats in (Get-MailboxStatistics -Server $DAGServer.Name | Where {$_.DisconnectDate -eq $Null})) {
    $NewMBXStatsDTRow = $MailboxStatistics.NewRow()
    $NewMBXStatsDTRow.TotalitemSize = $MailboxStats.TotalItemSize
    $NewMBXStatsDTRow.ItemCount = $MailboxStats.ItemCount
    $NewMBXStatsDTRow.LastLogonTime = $MailboxStats.LastLogonTime
    $NewMBXStatsDTRow.LastLogoffTime = $MailboxStats.LastLogoffTime
    $NewMBXStatsDTRow.MailboxGUID = $MailboxStats.MailboxGuid.ToString()
    $MailboxStatistics.Rows.Add($NewMBXStatsDTRow)
    $StopWatch.Stop()
    $ElapsedTime = $StopWatch.Elapsed
    Write-Host "The script took" $ElapsedTime.Hours "hours," $ElapsedTime.Minutes "minutes, and" $ElapsedTime.Seconds `
    "seconds to run."
    Here are the results in speed:
    The script took 0 hours, 3 minutes, and 13 seconds to run.
    So yeah... ~3 minutes versus ~1 hour, I would say that's an improvement.
    Now I will go back to my script and as I process each mailbox I will pull it's statistics information out of the DataTable using its GUID with:
    If ($MailboxStats = $MailboxStatistics.Rows.Find($Mailbox.MailboxGUID)) {
    # Insert mailbox statistics processing here using the $MailboxStats variable with "." extensions.
    } Else {
    # Mailbox statistics weren't found so go grab them individually as a backup mechanism for scenarios when a user's mailbox got moved out of the DAG to a non-DAG database for whatever reason.
    It's a little silly that I have to extract the information out of each DAG server and put it in an in-memory table just to speed this process up, but clearly there is overhead with the Get-MailboxStatistics cmdlet and grabbing more mailboxes at once helps
    negate this issue.
    I'm going to mark my own response as an answer because I don't think anyone else is going to come up with something better than what I put together.

  • Get-MailboxStatistics command to run and not count hidden objects

    I have a script that generates a report on a set of mailboxes in an OU and how many messages are in the Inbox using the following command:
    Get-MailboxFolderStatistics $mailbox -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"}
    There is a lot more to this script and it outputs a lot of information, but the count of items in the inbox is always wrong. It seems to be counting a lot of hidden items which users cannot see. From my reading in many forums this is a common problem, and
    so far I have not found a solution.
    Is there a way to fun the Get-MailboxFolderStatistics command and folder out hidden objects?

    `Thank you for the response, but unfortunately I have been tasked to find a way to get this working. I understand that the Get-MailboxStatistics command is unable to filter out hidden items but I need to find a way to make this report possible. I can understand
    the limitations of the command and the technology, but unfortunately the CEO of our company will not accept that as an answer and making this report working is not an option.
    To at least allow the report to function for now, I have created a report which manually adjusts for the hidden objects in each box. This does require the manual effort however of adjusting an input file which keeps track of the number of hidden objects
    in each box. Here is the code that generates the report:
    $mailboxes = @(get-mailbox -OrganizationalUnit "<ORGANIZATION UNIT>")
    $report = @()
    foreach ($mailbox in $mailboxes)
        $inboxstats = Get-MailboxFolderStatistics $mailbox -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"}
        $MailboxInfo = Get-MailboxStatistics $mailbox | Select LastLoggedOnUserAccount,LastLogonTime,LastLogoffTime
        $inboxstatCount = Get-MailboxFolderStatistics $mailbox -FolderScope Inbox | Where {$_.ItemsInFolder -gt 0 -and $_.FolderType -like "Inbox"}
        $RawInboxCount = $inboxstatCount.ItemsInFolder
        if ($mailbox.DisplayName -like "BillingFaxes")
            $CurrentHiddenCount = "$HiddenCountBillingFaxes"
        If ($mailbox.DisplayName -eq "callcenter")
            $CurrentHiddenCount = $HiddenCountcallcenter
        If ($mailbox.DisplayName -eq "lab")
            $CurrentHiddenCount = $HiddenCountcathlab
        If ($mailbox.DisplayName -eq "cviholter")
            $CurrentHiddenCount = $HiddenCountcviholter
        If ($mailbox.DisplayName -eq "medrecs")
            $CurrentHiddenCount = $HiddenCountmedrecs
        If ($mailbox.DisplayName -eq "appointments")
            $CurrentHiddenCount = $HiddenCountNFRappointments
        If ($mailbox.DisplayName -eq "pharmacy")
            $CurrentHiddenCount = $HiddenCountpharmacy
        If ($mailbox.DisplayName -eq "referrals")
            $CurrentHiddenCount = $HiddenCountreferrals
        If ($mailbox.DisplayName -eq "research")
            $CurrentHiddenCount = $HiddenCountresearch
        #else
        #{ $CurrentHiddenCount = "No Value" }
        #DIAGNOSTIC VALUES OUTPUT
        Write-Host "--------------------------------------------------------------"
        Write-Host "Current Mailbox" $mailbox.DisplayName
        Write-Host "Current Inbox Count from the report=" $RawInboxCount
        Write-Host "Current Hidden Count Number" $CurrentHiddenCount
        Write-Host "The Math should equal " ($RawInboxCount - $CurrentHiddenCount)
        $mbObj = New-Object PSObject
        $mbObj | Add-Member -MemberType NoteProperty -Name "Display Name" -Value $mailbox.DisplayName
        $mbObj | Add-Member -MemberType NoteProperty -Name "Inbox Size (Mb)" -Value $inboxstats.FolderSize.ToMB()
        $mbObj | Add-Member -MemberType NoteProperty -Name "Inbox Items" -Value ($RawInboxCount - $CurrentHiddenCount)
        $mbObj | Add-Member -MemberType NoteProperty -Name "Last User to Log On" -Value $MailboxInfo.LastLoggedOnUserAccount
        $mbObj | Add-Member -MemberType NoteProperty -Name "Time User was last logged in" -Value $MailboxInfo.LastLogonTime
        $mbObj | Add-Member -MemberType NoteProperty -Name "Time User last logged off" -Value $MailboxInfo.LastLogoffTime
        $report += $mbObj
    All $Hidden----- variables are set to values from an imported file that must be updated regularly. It's messy, but at least it is getting the information we need to those that need it. If anyone can suggest a way to make this work without the constant need
    to adjust the numbers for hidden items please let me know.

  • I'm trying to clean up my mailbox and when I delete an item(s) I get a message that say's "operation could not be completed- file exists. Further, when I do this one message is copied (not deleted) to the trash folder. Can someone help me through this?

    I'm trying to clean my mailbox and when I click on delete or highlight and move to trash I get a message that says "operation could not be completed - file exists. Further, when I select a message or group of messages, one of them is copied (not deleted) to the trash folder. Can someone help me through this?
    Thanks.

    It's a POP account. I decided to clean up my mailbox today after noticing the computer was real slow after USA Today started sending their daily top stories with new graphics. Also before I noticed the problem with mail deletion - two things happened. 1) I updated security sofware as prompted by Apple and 2) downloaded Mackeeper and went throught some preliminary scans but did not buy their package. Thanks forn nstaying with me.

  • Use get-mailboxstatistics to report individual email sizes.

    Hello all,
    In exchange2010 I use the "get-mailboxstatistics" to report on users with large email boxes.
    Is there a way to use report in a csv file the individual email sizes in a particular users mailbox? e.g. instead of just saying "user Albert.Einstein has a mailbox of 512mb", digging deeper and saying "of Albert Einsteins 512mb there are 5*50mb emails".
    That would be great if there was... then i could narrow down the chumps who send movies in company emails.
    Thanks

    Hi James
    I do not think we could get all emails' size, but we can list the folder via the command below
    Get-MailboxFolderStatistics -identity <User> | Select Name, FolderSize
    Cheers
    Zi Feng
    TechNet Community Support

  • Get-MailboxStatistics option

    I am running this against MSOL but don't think it will matter.  I am looking to generate a report that shows mailboxes that have not been logged onto or ones that have not been logged onto in a while.  So far, I am running get-mailbox -resultsize
    unlimited | Get-MailboxStatistics | Sort-object lastlogontime -Descending | fl displayname, LastLogonTime >C:\Users\username\Documents\LastLogonTime.CSV
    My issues are:
    1.  Mailboxes that have not been logged into are not reported.
    2.  I have thousands of mailboxes and only want the output to show the ones with the most time since they were last logged onto.  I am OK with just limiting the result size so long as the results are the ones with the most time since last logon.
    Any ideas would be appreciated!
    ~Eric

    Hi Eric,
    I have some tests in my environment using Exchange 2013. You can use the following cmdlet Amit provided to get the inactive users who are not accessed in last 90 days and export the result to csv file.
    Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where{$_.Lastlogontime -lt (Get-Date).AddDays(-90)} | Select DisplayName, LastLoggedOnUserAccount, LastLogonTime | Export-csv C:\InactiveUsers.csv
    What's more, the mailboxes which are not accessed at all will be listed in the warning lists.
    Is there any update with your issue?
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • Get-mailboxstatistics export Identity

    Hello all
    I run the below script to get the total ItemCount and Totalitemsize  for mailboxes from a .csv file. The script works, however instead of exporting the "Displayname" for the user, I need to export the "Identity" of the user.
    However it appears "Identity" is not an exportable parameter when running the "get-mailboxstatistcs"  command
    $users = Import-Csv -Path C:\temp\mailboxes.csv
    $users |foreach {Get-MailboxStatistics -Identity $_.identity} |select displayname,itemcount,totalitemsize |Export-Csv c:\temp\concordmailboxsize.csv
    I need exporting the users Identity instead of the users Displayname
    Thank you
    Bulls on Parade

    The object returned by get-mailboxstatistics already has an Identity property, but it's the identity of the mailbox (a guid).  But you can replace that with the user identity:
    $users = Import-Csv -Path C:\temp\mailboxes.csv
    foreach ($user in $users)
    { Get-MailboxStatistics -Identity $user.identity |
    foreach {
    $_.identity = $user.identity
    $_ | select Identity,itemcount,totalitemsize
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Mailbox and user report

    Is there anyway within exchange to run a report of all mailboxes, and the mailbox owner (i.e. the domain account), and the domain accounts status (i.e. enabled/disabled/non-exisitant ie deleted from AD). trying to determine orphaned mailboxes of exemployees.
    If there is an easier way to do this please let me know.

    Hey
    This command will help you get the list of disconnected mailbox - you can modify the same to get the other results.
    Get-MailboxStatistics | Where-Object {$_.DisconnectDate –notlike ‘’} | select Displayname, Database
    Syed MM Messaging SME - IBM || MCTS || MCSE || MCSA || VCP5 || VCA ||

  • Exchange 2010 disconnect AD user from mailbox and reconnect the mailbox to a new copy of the same user with a different username

    How can i get the following done:
    Exchange 2010 disconnect AD user from mailbox and reconnect the mailbox to a new copy of the same user with a different username?
    i nmust do this for 16 users TODAY, SO PLEASE HELP ME OUT HERE.
    Thanks in advance!!
    kind regards,
    Rene Veldman
    System Administrator Teidem bv, The Netherlands.

    Rene,
    Why are you not changing the username of the existing account, instead of deleting the existing one and creating a new one?
    If you truly need to delete and create new, you can save the GUID for the mailbox (Get-MailboxStatistics <mailbox alias> | Fl MailboxGuid), mail disable the existing account (Disable-Mailbox <mailbox alias>
    will work), clean the mailbox database it was hosted on (Clean-MailboxDatabase
    <database name>), then create your new account and recover the existing mailbox to that new account (Connect-Mailbox -Identity <Guid from before> -Database <Database name> -User <SAM account name of new account> -Alias
    <what you wish to set the alias to>).  In PowerShell, for all steps, you would do the following:
    $MbxAlias = <mailbox alias>
    $NewMbxAcct = <SAM Account Name for new account>
    $NewMbxAlias = <new alias for mailbox>
    $DomCtrl = (dir env:\LOGONSERVER).Value.Substring(2)
    $MbxGuid = (Get-MailboxStatistics $MbxAlias -DomainController $DomCtrl).MailboxGuid
    $MbxDb = (Get-Mailbox $MbxAlias -DomainController $DomCtrl).Database
    Disable-Mailbox $MbxAlias
    Clean-MailboxDatabase $MbxDb
    Connect-Mailbox -Identity $MbxGuid -Database $MbxDb -User $NewMbxAcct -Alias $NewMbxAlias -DomainController $DomCtrl
    You will need to supply the information in bold in the above commands, and you will need to create the new account before you run the above commands.  I include direct use of a specific domain controller so you won't need to worry about replication. 
    If you are changing the account from one domain to another, this will not help, and you will need to wait for replication throughout the process, running the commands individually.

  • Mailbox and Submailbox Issue

    We have various mailboxes set up for our customers. Our typesetter moved a client's mailbox into another client's mailbox. The created a sub-mailbox. So I've tried the obvious of moving the Sub out, creating a new mailbox and moving the messages to it, and going into the Users/Username/Library/Mail/Mailboxes folder to move it there.
    Nothing worked even copy and paste into the new mailbox didn't work. Does anyone have any good ideas? I've searched through the forum, but didn't see anything off hand. Thanks!

    Please, don’t paraphrase. Report accurately what you’re doing and any error messages you get.

  • In Gmail we have two mailboxes mine and my wife's. When I send from my mailbox and when i indicate my mailbox in the 'from' box, it always picks up and sends my wife's email address. Help

    in Gmail we have two mailboxes mine and my wife's. When I send from my mailbox and when i indicate my mailbox in the 'from' box, it always picks up and sends my wife's email address. Help

    I have this exact problem.  I have 3 email addresses on my mac and I can select one, and the email still be sent through another account and I won't know it until I get a reply for that email in one of the other accounts.
    MacBook Pro, Mac OS X 10.9

  • Where are my mailboxes and mail?

    Last night I downloaded OS X 10.8.4 to my iMac and now all of my Mailboxes and mail from yesterday back are not visible.  Where can I find them?

    Back up all data. Don't continue unless you're sure you can restore from a backup, even if you're unable to log in.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    This time you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

Maybe you are looking for