Thursday, February 27, 2014

Exchange 2013 Backup Status Alert

 Today created a task schedule which can able to read the backup status of all the Exchange 2013 database and provide you email report to your inbox.

This makes easier for our daily operation to review the backup status.

 Login to the Exchange Server - Go to Administrative Tools - Click Task Scheduler - Create New Task

 Task: Exchange 2013 Backup Status

 Description: To Monitor Exchange 2013 Backup Status

 Program/Script: C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe
 Add Arugument: -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; Send-MailMessage -From admin@mail.com -To rajis@mail.com,u1@mail.com -SmtpServer server.mail.com -Subject Exchange_2013_Backup_Status -body (Get-MailboxDatabase -Status * | Where-Object {$_.Mounted -like "True"} | Select-Object Identity, Mounted*, Last* | Sort-Object LastFullBackup -desc | format-table -autosize | out-string)"

 Note: Change the From Address, To Address, SMTPServer Detail according to your infra

Wednesday, February 26, 2014

Exchange Server 2013 Service Pack 1

Microsoft has released Exchange Server 2013 Service Pack 1 which we have been waiting for longer period to get supported for Windows Server 2012 R2. They have also introduced Service Pack 1 for other Microsoft 2013 Product and updates for Exchange 2007 & Exchange 2010 which are added in the below article.The below list provides the other features that is included in Exchange Server 2013 SP1.Preparation of schema is required as follows

setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms

Before upgrading to SP1 on the existing Exchange 2013 environment

setup.exe /m:upgrade /IAcceptExchangeServerLicenseTerms

Architecture & Administration features added in SP1
  1. Windows Server 2012 R2 support
  2. Exchange Admin Center Cmdlet Logging
  3. Exchange 2013 SP1 includes 981 cmdlets
  4. Active Directory Federation Services for OWA - Set-EcpVirtualDirectory and Set-OWAVirtualDirectory -AdfsAuthentication
  5. Edge Transport server role
  6. New communication method MAPI over HTTP(MAPI/HTTP) for Exchange and Outlook - Set-OrganizationConfig –MapiHttpEnabled $true
  7. DAGs without Cluster Administrative Access Points
  8. SSL offloading for OWA, EAC< OAB, EAS, EWS, OA, Autodiscover, Mailbox Replication Proxy Service, MAPI virtual directory for Outlook clients
Security and Compliance features added in SP1
  1. DLP Policy Tips in Outlook Web App
  2. DLP Document Fingerprinting
  3. DLP sensitive information types for new regions
  4. S/MIME support for OWA - Requires Internet Explorer 9 or greater to use this feature
  5. Organizations can add custom documents to the set of DLP sensitive data types
User Experience features added in SP1
  1. Enhanced text editor for OWA
  2. Apps for Office in Compose
  3. OWA Junk Email Reporting
The issue that are resolved on Exchange 2013 Service Pack 1

2860242 HTML format is lost after saving as an MSG file in Exchange 2013
2900076 Mailbox quota warning message uses an incorrect language in Exchange Server 2013
2910199 "Reply all by IM" chat window displays seven recipients in Outlook Web App
2913999 Meeting request body and instructions are lost in delegate's auto-forwarded meeting request
2918655 Microsoft.Exchange.Servicehost.exe crashes after you enable FIPS
2918951 Users cannot access public folders after you upgrade to Exchange Server 2013 Cumulative Update 3
2925281 Outlook connectivity issue if SSLOffloading is "True" in Exchange 2013
2925544 Empty ExternalURL value for ActiveSync virtual directory after build-to-build upgrade of Exchange Server 2013
2927708 Resource mailboxes that are created by EAC will not be updated by policies in Exchange Server 2013
2928748 Default from delegate's address in shared mailboxes in Exchange Server 2013
2928803 Long server connection for Outlook after a database failover in Exchange Server 2013
2930346 POP3 access does not work if the name of the resource mailbox differs from the user's name
2930348 Manual redirection occurs in Outlook Web App if External URLs in each site are the same
2930352 Outlook Web App cross-site silent redirection does not work in Exchange Server 2013

Downloads:

Exchange Server 2013 SP1 UM Language Packs  - http://www.microsoft.com/en-us/download/details.aspx?id=41997
Microsoft Exchange Server 2013 Service Pack 1 (SP1) - http://www.microsoft.com/en-us/download/details.aspx?id=41994

Reference Article:

http://blogs.technet.com/b/exchange/archive/2014/02/25/exchange-server-2013-service-pack-1-available.aspx
http://technet.microsoft.com/en-us/library/jj907309%28v=exchg.150%29.aspx
http://support.microsoft.com/kb/2926248

Other Service Pack and hotfixes -

Update Rollup 13 for Exchange Server 2007 Service Pack 3 (KB2917522) - http://www.microsoft.com/en-us/download/details.aspx?id=41995
Update Rollup 5 For Exchange 2010 SP3 (KB2917508) - http://www.microsoft.com/en-us/download/details.aspx?id=42001
Microsoft Office 2013 Service Pack 1 - http://blogs.technet.com/b/office_sustained_engineering/archive/2014/02/25/announcing-the-release-of-service-pack-1-for-office-2013-and-sharepoint-2013.aspx
Office Web App 2013 Service Pack 1 - http://support.microsoft.com/kb/2817431

Monday, February 24, 2014

Exchange Server 2013 Text Messaging


We can configure SMS Text Message Notification for various situation like Calendar notifications, Voice mail notifications, Email notifications if your user's Mailbox hosted in Exchange Server 2013
To set up your phone to receive text messages when you want to have Calendar notifications, Voice mail notifications, Email notifications use the steps as follows

Note: Text message fees are applicable and it will appear on your phone bill.

Login to Outlook Web App, click Options > See All Options > Phone > Voice Mail tab.


     In the Notifications section, choose one of the following options:
  • ·         Calendar notifications... 
  • ·         Voice mail notifications... 
  • ·         Email notifications using an Inbox rule...

1.1 Turn On Notification

First step is to turn on the notification of text messaging. Click Turn on Notifications
Select Setup Notification: Need to select your operator, 

 
It will request to provide your Mobile Operator.

Note: As of now Exchange Server 2013 supports only the below list of operators.

Locale: United State
Mobile Operator: AT & T, Sprint PCS, T-Mobile, Verizon Wireless

Locale: Canada,
Mobile Operator:Bell Telus Mobility

Locale: Romania
Mobile Operator:Orange Romania

Provide your telephone number. It will send you the passcode on your mobile number. 



Type the passcode for confirmation

 1.2 Calendar Notifications:

 

On Selecting Calendar Notification: Select the option based upon your requirement.


1.3 Email Notification Using Inbox Rule:

Similarly for the text messaging for the email notification, select the option based upon your requirement and setup them up

 1.4  Voice mail notifications

In the Notifications section, choose the options:



And also SMSNotification for VoiceMail and Missed call can be configured using the Exchange Powershell Command.  You can enable by using the Set-UMMailboxPolicy cmdlet and the Set-UMMailbox cmdlet in the Shell. 

You can view the status of text message notifications by using the Get-UMMailboxPolicy cmdlet and the Get-UMMailbox cmdlet. 

 Attribute: UMSMSNotificationOption
 Value: VoiceMail, VoiceMailAndMissedCalls, and None

 For Example:

 Set-UMMailbox- -id MyUMMailbox -UMSMSNotificationOption VoiceMailAndMissedCalls.
 Set-UMMailboxPolicy -id MyUMMailboxPolicy - AllowSMSNotification $true.

 Ref: http://technet.microsoft.com/en-us/library/dd298001%28v=exchg.150%29.aspx

Friday, February 21, 2014

Exchange 2013 DAG Error: The seeding operation failed. Error: An error occurred while performing the seed operation.

Exchange 2013 DAG Error: The seeding operation failed. Error: An error occurred while performing the seed operation.

 Error: Failed to open a log truncation context to source server 'Server1.Mail.Com'. Hresult: 0xc7ff1004. Error: Error returned from an ESE function call (-1305).

 Solution:
  • Remove the Passive copy database from the passive node: Remove-MailboxDatabaseCopy
  • Rename the log folder and database folder path: Add-MailboxDatabaseCopy -Identity -MailboxServer -ActivationPreference -Verbose
  • Dismount the active database again : DisMount-MailboxDatabase
  • Mount the active database again: Mount-MailboxDatabase
  • Add the passive copy database
  • Check the database copy status: Get-MailboxDatabaseCopyStatus
  • If still fails wait for few minutes then run update the database: Update-MailboxDatabaseCopy -Database only
  • Then update the catalog file: Update-MailboxDatabaseCopy -Catalog only
  • Check out the database it should be healthy state: Get-MailboxDatabaseCopyStatus

Tuesday, February 18, 2014

Exchange Server 2013 Powershell Script Task Scheduler

Sometime we try to automate the powershell script using the task scheduler. Let me explain in detail the step by step on how to move forward for Exchange Server 2013 Powershell Script in the Task Scheduler

To connect another Exchange Server Management Shell use the following command

Connect-ExchangeServer

To verify the Windows Powershell can able to execute the Exchange management Shell command.

Open the Windows Powershell - Execute the following command to verify

C:\Windows\System32\WindowsPowerShell\v1.0>Powershell.exe -PSconsoleFile "E:\Program Files\Microsoft\Exchange Server\V15\Bin\ExShell.psc1" -command Get-queue

The above command works in Exchange 2013 Mailbox Server but when we execute them in Exchange 2013 CAS Server it fails. Reason we need use to remotepowershell instead of localhost powershell

C:\Windows\System32\WindowsPowerShell\v1.0>Powershell.exe -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; Get-queue"

To provide the output in the text file

C:\Windows\System32\WindowsPowerShell\v1.0>Powershell.exe -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; Get-queue > C:\temp\queu.txt"
To execute the Exchange 2013 Powershell script in the Windows Powershell

C:\Windows\System32\WindowsPowerShell\v1.0>Powershell.exe -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; C:\Temp\Raji\Test-ExchangeServerHealth.ps1"

To send email using the Powershell command of the Exchange 2013 Output using Windows Powershell

C:\Windows\System32\WindowsPowerShell\v1.0>Powershell.exe -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; Send-MailMessage -From admin@mail.com -To user1@mail.com,user2@mail.com -SmtpServer smtp.mail.com -Subject Exchange_2013_DBStatus -body (Get-Mailboxdatabasecopystatus * | sort-object ContentIndexState | Select-Object Name,ContentindexState,Status | format-table -autosize | out-string)"
I belive this is more than enough....Now we can move how to bring them in Task Schedule

1. Open the Task Scheduler in Windows > Task Scheduler Library > Right click and “Create Task..“

Exchange 2013 Automated Health Report

2. Type a descriptive name for your task and click Next.

3. On the Trigger section, choose your schedule that fits your needs.

4. On the Action, choose “Start a program” ,Click Next.

5. On the “Start a Program” subsection, Enter:

    In the Program/Script, copy and paste

C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; Send-MailMessage -From admin@mail.com -To user1@mail.com,user2@mail.com -SmtpServer smtp.mail.com -Subject Exchange_2013_DBStatus -body (Get-Mailboxdatabasecopystatus * | sort-object ContentIndexState | Select-Object Name,ContentindexState,Status | format-table -autosize | out-string)"
It prompt dialog box where it says

    In the Add Arguments (Optional) -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; Send-MailMessage -From admin@mail.com -To user1@mail.com,user2@mail.com -SmtpServer smtp.mail.com -Subject Exchange_2013_DBStatus -body (Get-Mailboxdatabasecopystatus * | sort-object ContentIndexState | Select-Object Name,ContentindexState,Status | format-table -autosize | out-string)"

Say Yes - In the Start in (Optional), leave it empty

6. Click Okay

Run the task now to verify is it working fine. Schedule the time accordingly to your time when you want to get it executed.

This is similar for Exchange 2007 and 2010 except the location of RemoteExchange.PS1 file

For Exchange 2007 - C:\Program Files\Microsoft\Exchange Server\RemoteExchange.ps1
For Exchange 2010 - C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1

Monday, February 17, 2014

Exchange 2013 Mailbox Server - NTFS allocation unit size

When we allocate LUN for Exchange 2013 Mailbox Server it is always best practise to put the disk in GPT mode with 64K NTFS allocation unit size on simple volume. In higher end Exchange Infrastucture we normally move to create mount point for LUN instead of all assign drive letter for each LUN. The above things are mostly known things.

If there is question to find out NTFS allocation unit size of the existing infrastructure then we will be unable to find them over GUI. Thought to share the easy steps on how to move forward.

1. List out the mount point in your Exchange Mailbox Server -

Go to Command Prompt type MountVol

C:\Users\admin>mountvol

Possible values for VolumeName along with current mount points are:

    \\?\Volume{f702e681-1628-11e3-8682-0050569424da}\
        D:\

    \\?\Volume{f702e688-1628-11e3-8682-0050569424da}\
        E:\

    \\?\Volume{5939c82d-3cf5-4f64-bf8d-0f175e7c06bd}\
        E:\DatabaseVolume01\

    \\?\Volume{e2d6a4b9-54ca-49ec-80f3-48ab64b4649d}\
        E:\DatabaseVolume02\

    \\?\Volume{51b2137c-38a0-40fb-9def-909b840b9e9f}\
        E:\DatabaseVolume03\

2. Use the fsutil to find the NTFS allocation unit size

C:\Users\exadmin>fsutil fsinfo ntfsinfo E:\Ex-DatabaseVolume01\
NTFS Volume Serial Number :       0x34c23257c2321e14
Version :                         3.1
Number Sectors :                  0x000000007ffbefff
Total Clusters :                  0x0000000000fff7df
Free Clusters  :                  0x0000000000faadd7
Total Reserved :                  0x0000000000000000
Bytes Per Sector  :               512
Bytes Per Physical Sector :      
Bytes Per Cluster :               65536
Bytes Per FileRecord Segment    : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length :           0x0000000001180000
Mft Start Lcn  :                  0x000000000000c000
Mft2 Start Lcn :                  0x0000000000000001
Mft Zone Start :                  0x000000000000c040
Mft Zone End   :                  0x000000000000cca0
RM Identifier:        92E4AAAA-4645-11E3-AC43-0050569424DA

3. Divide the Bytes Per Cluster by Bytes Per FileRecord Segment (65536/1024 = 64 KB). It is acceptable to go 64KB size for Database File since the edb files are larger. The reason to have the same for log files is they are 1024KB (1MB) in size so 16 blocks would be needed for each one.

Ref: http://technet.microsoft.com/en-us/library/ee832792%28v=exchg.150%29.aspx

Exchange 2013 Mailbox Move Request History

After the mailbox is moved from the legacy version (Exchange 2007 or 2010) to Exchange server 2013 we sometimes need to understand the duration of time, mailbox size, when the move started and completed from the source to target server.

There are various way to see them if they are recent move

1. Login in the Exchange Admin Center - Go to Recipient - Click Migration - Click Detail
2. Using the Powershell cmdlet Get-MoveRequest raji.subramanian@mail.com | fl
3. If you have used batch migration use the following powershell cmdlet

Get-MigrationUser raji.subramanian@mail.com | fl
Get-MigrationUserStatistics raji.subramanian@mail.com | fl

But the above report will be displayed until the move request ID present in the exchange server 2013. Incase if they are deleted or need to find the move request account detail that was performed long back ago.
Use the following Powershell cmdlet to acheive it

Get-MailboxStatistics -Identity raji.subramanian@mail.com -IncludeMoveHistory
Get-MailboxStatistics -Identity raji.subramanian@mail.com -IncludeMoveReport

Note: I don't see any major difference on the powershell output displayed for IncludeMoveReport and IncludeMoveHistory parameter.

Saturday, February 15, 2014

Exchange 2013 Database Availability Group - How to Move Database and Log Path

Exchange 2013 Database Availability Group - How to Move Database and Log Path

Move-DatabasePath Powershell cmdlet is used to change the location path of Database and Log folder in Exchange Server 2013 . It just a simple command

To Move Both Database and Logfile

Move-Databasepath -Identity “DatabaseName” –EdbFilepath “C:\Newlocation\DBname.edb” –LogFolderpath “C:\Newlocation”

To Move Only Database

Move-Databasepath -Identity “DatabaseName” –EdbFilepath “C:\Newlocation\DBname.edb”

To Move Only Log Files 

Move-Databasepath -Identity “DatabaseName” –LogFolderpath “D:\NewLocation”

What is important to understand is - how to move the database and log path when the exchange 2013 mailbox server configured under Database availablity group. This makes some few challenges since it's holds passive copy and remote lagged copy. Follow the below step as best practise that can be helpful on moving the Database and Log Path in Exchange server 2013 mailbox server.

1. Make sure backup is perfromed successfully and log are purged for the database that needs to be moved.

Get-MailboxDatabase –Status | format-table Name,Mounted,BackupInProgress,OnlineMaintenanceInProgress

2. Remove the remote Lagged copy of the Database that new to be moved to new location in Exchange mailbox server

Remove-MailboxDatabaseCopy –Identity \ -Confirm:$False

3. Remove the Passive copy of the Database that new to be moved to new location in Exchange mailbox server

Remove-MailboxDatabaseCopy –Identity \ -Confirm:$False

4. Dismount the active copy of the database

Dismount-Database –id –Confirm:$False

5. Move the database and log folder to different location.

Move-DatabasePath –Identity –EdbFilepath “C:\Newlocation\Databasename.edb” –LogFolderpath “C:\Newlocation”

6. Mount the database

Mount-Database –id

7. Add the passive copy of the active database

Add-MailboxDatabaseCopy –id –MailboxServer –ActivationPreference

8. Add the remote passive copy of the active database

Add-MailboxDatabaseCopy –id –MailboxServer –ActivationPreference

Verification:

1. Check the database and content index are in health status - Get-Mailboxdatabsecopystatus * | Out-GridView

Note:

1. Make sure the database is not performing backup while doing the above change
2. Need's downtime since database will dismounted on perfroming this action.

Ref:  http://technet.microsoft.com/en-us/library/bb124742%28v=exchg.150%29.aspx

Friday, February 14, 2014

Windows 8 Time out Period

My laptop run with Windows 8 Operating system. Always it goes time out and get the logon screen if i am over the call or discussion with my team members for few minutes.Every time i need to open VLC player to run behind so that my laptop never gets lock out if i keep it idle for few minutes

Today thought to get it understand to increase the time out value. Found on tweaking the below registry value can able to achieve the requirement.

HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveTimeOut - 1800 (30 minutes)
And also

Right Click Desktop - Personalize - Screen Saver - Change time as needed or 0 for off - uncheck On resume, display logon screen - Apply - Click OK

Wednesday, February 12, 2014

Exchange Server 2013 ActiveSync User Report

This script works in co-existence mode of Legacy Version of Exchange Server with Exchange Server 2013 and is used to fetch the user information from Exchange 2007 and 2013. It provides the detail in html format. The Output will have complete detail of user information like DisplayName, EmailAddress, ServerName, DatabaseName, MailboxSize, ItemCount, ## ActiveSyncMailboxPolicy, DeviceType, LastSyncAttemptTime, LastSuccessSync. It should be executed on the respective Exchange mangement shell to get user details. For Example:Exchange 2007 User report will work only in Exchange Server 2007 Management Shell and Exchange 2013 user report will only in Exchange 2013 Management Shell. The reason is by default few Exchange Powershell command doesn’t have forward and backward compatibility.
The script is written with easy logic where you can able to customize based upon your requirement
######################################################################## The below report is used to fetch the user information from Exchange 2007 and 2013. It provides the detail in html format. The Output will have complete detail of user information like DisplayName, EmailAddress, ServerName, DatabaseName, MailboxSize, ItemCount, ## ActiveSyncMailboxPolicy, DeviceType, LastSyncAttemptTime, LastSuccessSync. It should be executed on the respective Exchange mangement shell to get user details. Exchange 2007 User report will work only in Exchange Server 2007 Management Shell and Exchange 2013 user report will only in Exchange 2013 Management Shell. The reason is by default few Exchange Powershell command doesn’t have forward and backward compatibility.
########################################################################
Write-host " Exchange Server Users List Report
-----------------------------------------------------------------------------------------------------
1.Need to Prepare Exchange Server 2007 User List Report
2.Need to Prepare Exchange Server 2013 User List Report" -ForeGround "Cyan"

Write-Host " "
$number = Read-Host "Choose The Task"
$output = @()
switch ($number)
{

1 {
## Exchange Server 2007 User List Report ##########################################
## HTML PAGE FORMAT ##################################################
$a = ""
## HTML PAGE FORMAT #######################################################
# Collecting Exchange Server Version
$MailboxServer = Get-Exchangeserver | Where {$_.AdminDisplayVersion -like "Version 8*" -and $_.ServerRole -like "Mailbox*"}
ForEach ($server in $MailboxServer)
{
# Collecting user list for the Exchange Server
$UserList = Get-ExchangeServer -Identity $Server | Get-Mailbox -ResultSize Unlimited
#Creating Array to collect each user information
$report = @()
foreach ($User in $UserList)
{
$CASInfo = Get-CasMailbox -identity $user
$MBXInfo = Get-Mailbox -Identity $user
$MBXStat = Get-MailboxStatistics -Identity $user
$ASStat = Get-ActiveSyncDeviceStatistics -Mailbox $user
$mbObj = New-Object PSObject
$mbObj | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $MBXInfo.DisplayName
$mbObj | Add-Member -MemberType NoteProperty -Name "EmailAddress" -Value $MBXInfo.PrimarySmtpAddress
$mbObj | Add-Member -MemberType NoteProperty -Name "ServerName" -Value $MBXStat.ServerName
$mbObj | Add-Member -MemberType NoteProperty -Name "DatabaseName" -Value $MBXStat.DatabaseName
$mbObj | Add-Member -MemberType NoteProperty -Name "MailboxSize" -Value $MBXStat.TotalItemSize
$mbObj | Add-Member -MemberType NoteProperty -Name "ItemCount" -Value $MBXStat.ItemCount
$mbObj | Add-Member -MemberType NoteProperty -Name "ActiveSyncMailboxPolicy" -Value $CASInfo.ActiveSyncMailboxPolicy
$mbObj | Add-Member -MemberType NoteProperty -Name "DeviceType" -Value $ASStat.DeviceType
$mbObj | Add-Member -MemberType NoteProperty -Name "LastSyncAttemptTime" -Value $ASStat.LastSyncAttemptTime
$mbObj | Add-Member -MemberType NoteProperty -Name "LastSuccessSync" -Value $ASStat.LastSuccessSync
$report += $mbObj
}
$rreport += $report
}
# Preparation of User List Report in HTML Format
$rreport | Sort-Object "LastSuccessSync" -descending | Select-Object DisplayName, EmailAddress, ServerName, DatabaseName, MailboxSize, ItemCount, ActiveSyncMailboxPolicy, DeviceType, LastSyncAttemptTime, LastSuccessSync | ConvertTo-Html -body "" -head $a | Set-Content c:\temp\Exchange2007UserReport.html
Invoke-Expression C:\temp\Exchange2007UserReport.html }
2 {
############################### Exchange Server 2013 User List Report############
###################### HTML PAGE FORMAT ################################
$a = ""
########### HTML PAGE FORMAT ###########################################
# Collecting Exchange Server Version
$MailboxServer = Get-Exchangeserver | Where {$_.AdminDisplayVersion -like "Version 15*" -and $_.ServerRole -like "Mailbox*"}
ForEach ($server in $MailboxServer)
{
# Collecting user list for the Exchange Server
$UserList = Get-ExchangeServer -Identity $Server | Get-Mailbox -ResultSize Unlimited
#Creating Array to collect each user information
$report = @()
foreach ($User in $UserList)
{
$CASInfo = Get-CasMailbox -identity $user
$MBXInfo = Get-Mailbox -Identity $user
$MBXStat = Get-MailboxStatistics -Identity $user
$ASStat = Get-MobileDeviceStatistics -Mailbox $user
$mbObj = New-Object PSObject
$mbObj | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $MBXInfo.DisplayName
$mbObj | Add-Member -MemberType NoteProperty -Name "EmailAddress" -Value $MBXInfo.PrimarySmtpAddress
$mbObj | Add-Member -MemberType NoteProperty -Name "ServerName" -Value $MBXStat.ServerName
$mbObj | Add-Member -MemberType NoteProperty -Name "DatabaseName" -Value $MBXStat.DatabaseName
$mbObj | Add-Member -MemberType NoteProperty -Name "MailboxSize" -Value $MBXStat.TotalItemSize
$mbObj | Add-Member -MemberType NoteProperty -Name "ItemCount" -Value $MBXStat.ItemCount
$mbObj | Add-Member -MemberType NoteProperty -Name "ActiveSyncMailboxPolicy" -Value $CASInfo.ActiveSyncMailboxPolicy
$mbObj | Add-Member -MemberType NoteProperty -Name "DeviceType" -Value $ASStat.DeviceType
$mbObj | Add-Member -MemberType NoteProperty -Name "LastSyncAttemptTime" -Value $ASStat.LastSyncAttemptTime
$mbObj | Add-Member -MemberType NoteProperty -Name "LastSuccessSync" -Value $ASStat.LastSuccessSync
$report += $mbObj
}
$rreport += $report
}
# Preparation of User List Report in HTML Format
$rreport | Sort-Object "LastSuccessSync" -descending | Select-Object DisplayName, EmailAddress, ServerName, DatabaseName, MailboxSize, ItemCount, ActiveSyncMailboxPolicy, DeviceType, LastSyncAttemptTime, LastSuccessSync | ConvertTo-Html -body "" -head $a | Set-Content c:\temp\Exchange2013UserReport.html
Invoke-Expression C:\temp\Exchange2013UserReport.html
}
}

Saturday, February 8, 2014

Exchange Server 2013 Maximum Database Size

Exchange Server 2013 Maximum Database Size

Although Exchange Server 2013 support 16 TB of database size but still we insisit to go for 2 TB as recommendation. Is there any reason for it ?...Yes as follow

1. Larger volumes takes longer time to backup and restore
2. It takes huge amount of time for replicating larger volume to the passive copy database in case of disaster
3. Background maintenance that is performed by the managed folder assistant will utilize more time
4. The risk profile of losing a large volume or device is significantly higher than losing a smaller device or volume.
5. It utilize significantly longer to check disk for integrity if there is any type of corruption

Exchange Server 2013 Information Store and Extensible Storage Engine - Deeper Look



Exchange Server 2013 Information Store and Extensible Storage Engine - Deeper Look

In Exchange Server 2013 they have re-written the store code into managed C# code.Where there is new process called Microsoft Exchange Store Worker.exe will get created for each database located in the server. This can be seen on going to the task manager - process tab. Each Microsoft.Exchange.Store.Worker.exe is mapped with process ID (PID) on it.

To find the database for which database the Microsoft.Exchange.Store.Worker.exe holds can be verified using the below powershell command

Get-MailboxDatabase -Status | ft Name, WorkerProcessID

The Microsoft.Exchange.Store.Service.exe will be used to manage the Microsoft.Exchange.Store.Worker.exe process

Memory Calculation of Microsoft Exchange Store Worker Process.

Earlier version of Exchange we have single Store.exe process which eats up the total memory of the Exchange server. In Exchange server 2013 each Microsoft Exchange Store Worker Process will have their own set of memory.

For Example: Server Detail:
Total Memory in the server:96 GB
Total Number of Database:12 DB
Number of Active Database:6 Active DB
Number of Passive Database:6 Passive DB
Max number of Database can turn Active in the server during disaster:9 Active DB + 3 Passive DB

The maximum number of active database can be set using the powershell command 

Set-MailboxServer -ID -MaximumActiveDatabases

Detail Calculation:

Amount of Memory used for ESE is 25% RAM = 96*25/100 = 24 GB will be allocated for Max Cache
The Microsoft.Exchange.Store.Service.exe distribute this 24 GB equally to total number of Database (24 GB/12 DB = 2 GB RAM each DB)
RAM For Total Number of Active Database = 6 * 2 = 12 GB
RAM For Total Number of Passive Database it uses 20% of 2 GB RAM = 400 MB =>  6 * 400 = 2.4 GB
RAM For Exchange server at Normal Condition = 6 Active DB + 6 Passive DB = (6 * 2) + (6 * 400) = 14.4 GB
RAM For Exchange Server on Server disaster  = 9 Active DB + 3 Passive DB = (9 * 2) + (3 * 400) = 19.2 GB

Divider = (MaximumActiveDatabases × 0.8) + (number of databases × 0.2)
Max Cache Target Per Worker = (Total ESE cache allocated from server memory/Divider)

For instance, if you set the MaximumActiveDatabases to 9 for the server in question, the calculation is now:
Divider = (9 × 0.8) + (12 × 0.2) = 7.2 + 2.4 = 9.6
Max Cache Target Per Worker = (24 GB/9.6) = 2.5 GB RAM
Total Sever RAM Cache Usage = (9 × 2.5 GB) + (3 × (2.5 GB*0.20)) = 22.5 + 1.5 = 24 GB (Passive copy utlize 20% of ESE cache of Active copy)

Hence in case if the Exchange server 2013 doesn't able to provide 25% of RAM to ESE cache then Event ID 906 in the application of Warning message will be generated

Moral: The reason for increase from 2 GB RAM to 2.5 GB RAM for Each Worker is reduce the footprint of I/O operation by holding more pages in the memory. And also Exchange 2013 uses six pages in one large I/O in which the each page size of 32 KB

Tuesday, February 4, 2014

Exchange Server 2013 NLB Best Practice

Exchange Server 2013 NLB Best Practice

Sometimes when we don't have Hardware Load balancer to configure array for the Client Access server we move to the next option of using windows network load balancer for high availability. While performing the patching over the CAS server we need to perform rebooting the server. This may leads to impact to the end user since the connection needs to be moved to the next CAS Server and may result to get reconnected again which will cause to prompt user name and password sometimes or it prompt "Outlook got disconnected"

In order to avoid the above behavior the best practice that can be followed for Network Load Balance

1. Open the Exchange management shell and run the following command providing the Exchange CAS Server Name

Get-Counter "\MSExchange RpcClientAccess\User Count" -ComputerName
Get-Counter "\MSExchange OWA\Current Unique Users" -ComputerName


2. Open the Windows Network LoadBalancer and perform drain-stop

3. Verify again on executing the same command

Get-Counter "\MSExchange RpcClientAccess\User Count" -ComputerName
Get-Counter "\MSExchange OWA\Current Unique Users" -ComputerName


4.  Stop the Microsoft Exchange RPC Client Access service (MSExchangeRPC)

5. Finally Reboot the server

Microsoft Exchange Server 2013 Cumulative Update 5

                               Microsoft Exchange Server 2013 Cumulative Update 5

Microsoft is so advance in releasing the KB article with the issue and having the solution that will get fix in CU installation. Although we know the solution but will not get resolved since CU is not released. :)
Find the article - http://support.microsoft.com/kb/2928846/en-us?sd=rss&spid=16662

Issue:  "Email messages that you send from the shared mailbox are not saved in the Sent Items folder of the shared mailbox. Instead, the messages are saved in the Drafts folder of the primary mailbox. Additionally, the messages do not synchronize in the Outlook for Mac 2011 client and are visible only when you use Outlook Web Access or a Windows Outlook client"

Solution: Install Microsoft Exchange Server 2013 Cumulative Update 5

Sunday, February 2, 2014

The mailbox GUID of an external system mailbox *** does not match the information in the Active Directory for the mailbox - Event ID 7043 - Exchange server Error

The mailbox GUID of an external system mailbox *** does not match the information in the Active Directory for the mailbox - Event ID 7043 - Exchange server Error

The below event will get generated when you have duplicate system mailbox in the Exchange server

Name: Application
Source: MSExchangeIS Mailbox Store
Event ID: 7043


Description:

The mailbox GUID of an external system mailbox ('Mailbox - SystemMailbox{bcedee61-d318-4dbb-b168-d89a275ce596}') does not match the information in the Active Directory for the mailbox. The existing GUID ('efc150c4-04e3-41e5-99cb-9dd193524e1e: /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=SystemMailbox{bcedee61-d318-4dbb-b168-d89a275ce596}') has been replaced with the expected GUID ('197a4757-c7ea-45e7-a8ec-d6d7116497c9: /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=SystemMailbox{bcedee61-d318-4dbb-b168-d89a275ce596}').
Solution:

1. Backup Active Directory
2. Open the Active Directory Users & Computers
3. Click the View menu at the top and check “Advanced Features”
4. Expand the “Microsoft Exchange System Objects” container.
5. Matched the GUID which we see in the event deleting the duplicate GUID.
6. Wait for few hours for replication.

Saturday, February 1, 2014

Exchange Server 2013 - File Share Witness.

Exchange Server 2013 - File Share Witness.

File Share Witness plays an important role in Exchange 2013 DAG. Without File Share Witness the DAG will not work in operational Mode. FSW will play their role when there is even number of DAG. The inner core cluster technology is implemented utilizing the quorum type Node and File Share Majority.

To check the File Share Witness Server use the following powershell command

Get-Cluster | Get-ClusterQuorum | FL

When the DAG member is in even number the witness.log file is locked by the cluster computer account which provides teh quorum type type Node and File Share Majority.

By default in the odd DAG members we will not able to see the witness.log file in the shared drive of file share witness server.

Hence the witness.log file will not get created. To check the Witness.log file when it get locked use the following command

C:\>net file

ID         Path                     User name            # Locks
----------------------------------------------------------------
1677722253 E:\fsw\Witness.log        ExAdmin$             0

When you have two File Share witness server as primary and alternate in DAG. Sometime we need to find which FSW Server the DAG is mapped. This can acheived using the below powershell command

Get-DatabaseAvailabilityGroup -Identity DAG -Status | Select-Object Name,Servers,WitnessServer,WitnessDirectory,AlternateWitnessServer,AlternateWitnessDirectory,OperationalServers,PrimaryActiveManager,WitnessShareInUse                          
On executing the above powershell command check the value WitnessShareInUse. It can hold the below value

Primary - means it uses primary file share witness server
Alternate - means it uses secondary file share witness server  

The blog is written to the share the knowledge mainly on Microsoft Exchange Server and other Microsoft product that experienced on day-to-day life.