Clear all completed Exchange Mailbox Move Requests in bulk

 In Exchange Power Shell, run one of the following:
The Variable Method:

$move = get-MoveRequest | Where {$_.Status –eq ‘completed’}
 Foreach($m in $move){Remove-MoveRequest $m –Confirm:$false}
Or
The One Liner:
get-MoveRequest | Where {$_.Status –eq ‘completed’} | Remove-moverequest -confirm:$false

Exchange Script to combine output from multiple commands into a single CSV file.

Scenario:  You want to combine information from the output of different Exchange Shell commands into a single CSV file. The three commands I am going to combine are below.

get-user     (This holds user specific info)
get-mailbox      (This holds mailbox specific info)
get-mailboxstatistics      (this holds mailbox statistics specific info)

Script:

$mailboxes = get-mailbox -resultsize unlimited | Where Database -like “EXCHDB*”
$mailboxes = $mailboxes | Sort alias

$mailboxes | Foreach-Object{
    $user = Get-User $_.name
    $mbx = Get-Mailbox $_.name
    $mbxstat = Get-MailboxStatistics $_.name
    Write-Host $user

    New-Object -TypeName PSObject -Property @{
        FirstName = $user.FirstName
        LastName = $user.LastName
DisplayName = $user.DisplayName
Title = $user.title
Department = $user.Department
Office = $user.Office
Manager = $user.manager
Alias = $mbx.Alias
Database = $mbx.database
Servername = $mbx.servername
OrganizationalUnit = $mbx.organizationalunit
TotalItemSize = $mbxstat.totalitemsize
TotalItemSizeInMB = $mbxstat | Select {$_.TotalItemSize.Value.ToMB()}
PrimarySMTPAddress = $mbx.primarysmtpaddress

    }
} | Export-csv C:outputMailboxAndUserInfo.csv

Prioritizing Move Requests in Exchange

Scenario:  You want to submit a move request with a higher priority over other pending move requests that are currently queued.  

Solution:  In Exchange Powershell, submit the move request with the -priority parameter.  The accepted values of the parameter are below.
Example:  New-moverequest jdoe1 -targetdatabase DB04 -priority High.
Accepted Values for -Priority Parameter:
Exchange 2010 SP2:  normal,high
Exchange 2013:  lowest, low, normal, high, highest
Notes:
1. By Default, all move requests have a Normal Priority.  
2. MRS will not respect an altered priority unless a move request is halted with the Suspend-MoveRequest cmdlet and then resumed with the Resume-MoveRequest cmdlet.
3. MRS does not halt processing normal-priority move requests when a high-priority mailbox move is initiated. The only time when priority is used is when MRS selects the next move request to process.
4. When MRS looks for new move requests that are waiting to be processed, it first sorts the requests by priority and then by LastUpdatedTimeStamp (a field indicating the last time that the move request was processed by MRS). High priority move requests are therefore selected by MRS before normal-priority move requests. The request priority is included in the msExchMailboxMoveFlags attribute.

Check ExSetup.exe file version information on all Exchange servers remotely

To check ExSetup.exe file version information on all Exchange servers remotely, use below one-liner.

Get-ExchangeServer | Sort-Object Name | ForEach{ Invoke-Command -ComputerName $_.Name -ScriptBlock { Get-Command ExSetup.exe | ForEach{$_.FileVersionInfo } } } | Format-Table -Auto

This message could not be sent. Try again later or contact your network administrator. Error [0x80004005-000000000-00000000]

Issue: This message could not be sent. Try again later or contact your network administrator. Error [0x80004005-000000000-00000000]
Scenario: Organization has throttling policy with recipient rate limit of 10,000 per day set for the organization. For this org, service mailboxes aren’t throttled. User has 2 mailboxes (primary and service mailbox) opened in Outlook. User has send-as permissions to the service mailbox but as a group member.
User tries to send from outlook as service mailbox to multiple recipients but received error message. see error message below
Undeliverable: your message did not reach some or all of the intended recipients. This message could not be sent. Try sending message again later or contact your network administrator. Error is
[0x80004005-000000000-00000000].
Resolution: Advised user to send message using Outlook web Access. User needs to login to OWA and open the service mailbox. Messages can now be sent without throttling.

Alternatively, for a user that insist on using Outlook, user must be given explicit send-as permission to the service mailbox so as to be able to bypass throttling policy

Outlook: There is a problem with the proxy server’s security certificate. The name on the security certificate is invalid or does not match the name of the site. Outlook is unable to connect to this server.

Issue: Error message from Outlook: There is a problem with the proxy server’s security certificate, %s. The name on the security certificate is invalid or does not match the name of the site. Outlook is unable to connect to this server. (%s)
  
Finding/Resolution: Checked Outlook provider settings and saw that server and certificate was set to 2 dashes(–)
used this command to fix: set-outlookprovider EXPR -Server $Null and Set-Outlookprovider EXPR -CertPrincipalName $Null
The command will set outlook provider EXPR to Null(Blank). By doing so Outlook will rely on autodiscover to get the correct outlook anywhere settings

Get all messages from all transport servers by a specific sender starting on a specific day and export to CSV

Issue/Task: Get all messages from all transport servers by a specific sender starting on a specific day and export to CSV
Get-TransportServer | Get-MessageTrackingLog -sender:test@test.com -start 7/15/2014 -resultsize unlimited | export-csv c:export.csv

After cancelling the install for Exchange 2013 CU5, users can no longer connect to IMAP.

Issue: The attempted install of Exchange 2013 CU5 was cancelled during the install process.  Afterwards users could not connect to the secure imap service.
Cause: CU5 for exchange 2013 install was attempted on these servers, hence they were put in maintenance state by CU5. Also found out that only the person/software that put the server in maintenance mode can take it off maintenance.
Troubleshooting/Resolution: From powershell type, Get-servercomponentstate servername. Found out Imap proxy was in an inactive state.
Resolution: This registry fix(though not recommended by microsoft) resolved the issue. go to
 HKEY_LOCAL_MACHINESOFTWAREMicrosoftExchangeServerv15ServerComponentStatesserverwideoffline
backup the servercomponentstates key
remove maintenance key
change functional key from 1:0:635407213073684026 to 1:1:635407212984929845 (Note that guid value is unique per server).

You are basically changing from 0 to 1 to make the server active. This activates all the inactive components

Message throttling policy created in Exchange 2013 not applying to Exchange 2010 mailboxes

Issue: In a coexistence environment, message throttling policy created in exchange 2013 not applying to exchange 2010 mailboxes

Resolution: Create message throttling policy in Exchange 2010 powershell. Apply separate throttling policy to Exchange 2010 mailboxes

Clients connecting to recently installed servers, but the clients have delayed/no connection

Issue
**************
Clients were trying to connect to servers that were recently installed, but currently offline for the process of completing setup, causing the clients to have delayed, or no connection at all.
Cause
*************
The servers were not set with the right URL, and once the servers are installed into a site, autodiscover will query AD to get the URL and other information, even if the servers are offline, the information is in AD and can be returned to users.
Once the users received the Internal URL for the offline servers, they would try to connect to that internal URL, and eventually timeout, then they would connect to the externally listed url, https://mail.test.com
Resolution
**************
We did a couple of things to try and prevent users from getting to the down servers
1.       We set the SCP autodiscover record to be mail.test.com on the 4 new servers
a.       Set-clientaccessserver –AutoDiscoverServiceInternalUri https://mail.test.com/autodiscover/autodiscover.xml
2.       We then went into ADSI edit and modified the internal URL for outlook anywhere on the 4 new servers as well
3.       We then restarted the app pool for autodiscover to clear the autodiscover cache
a.       This then allowed users to set the connection point to mail.test.com
4.       For clients, they may need to do a repair profile to remove the server FQDN from the outlook profile and restart outlook
Next Steps
************
When the 4 new servers are brought back up verify that the outlook anywhere settings are correct from powershell.
Get-outlookanywhere <NEW SERVER NAMES> | fl
Check internal URL and make sure it is mail.test.com
May want to change the Internal URL to the mobile. For all the servers, removing the internal FQDN

Also change the AutoDiscoverServiceInternalUri for the client access servers to mail.test.com, so users do not try to use an individual server name when they discover an SCP record.