Configuring Exchange 2013 Logging

Exchange 2013 heavily log the health of the server and all mail related actions and can fill up the main drive. There are two options to configure and move the log files to a separate dedicated log drive.

1. The first method is using an app called Junction from Sysinternals. You can create a symbolic link of the log folder and redirect to your desired drive. The folder has to be created by the app and cannot exist, therefore you need to rename your existing folder to log.old and then create one with the Junction. Of course the folder cannot be renamed while Exchange services are running, you need to do the whole process in safe mode. There are two locations where you need to create the sym link. The first called Logging and it is under C:\Program Files\Microsoft\Exchange Server\V15\. The second one called Logs and it is under C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles

Junction

Once you are done restart your server and make sure all services are running and everything looks good

2. The second method is to use PowerShell and Notepad to configure services where there is an option to do that. Let’s start with the PowerShell part. It’s pretty long but has all the settings I’m aware of.

Start to put the server name into a variable

$exchangeservername = $env:computername

Then run the following PS cmdlets

Set-TransportService -Identity $exchangeservername -ConnectivityLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Connectivity"

Set-TransportService -Identity $exchangeservername -MessageTrackingLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking"

Set-TransportService -Identity $exchangeservername -IrmLogPath "L:\Program Files\Microsoft\Exchange Server\V15\Logging\IRMLogs"

Set-TransportService -Identity $exchangeservername -ActiveUserStatisticsLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ActiveUsersStats"

Set-TransportService -Identity $exchangeservername -ServerStatisticsLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ServerStats"

Set-TransportService -Identity $exchangeservername -ReceiveProtocolLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive"

Set-TransportService -Identity $exchangeservername -RoutingTableLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\Routing"

Set-TransportService -Identity $exchangeservername -SendProtocolLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend"

Set-TransportService -Identity $exchangeservername -QueueLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\QueueViewer"

Set-TransportService -Identity $exchangeservername -WlmLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\WLM"

Set-TransportService -Identity $exchangeservername -PipelineTracingPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\PipelineTracing"

Set-TransportService -Identity $exchangeservername -AgentLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\AgentLog"

$EdgeSyncServiceConfigVAR=Get-EdgeSyncServiceConfig

Set-EdgeSyncServiceConfig -Identity $EdgeSyncServiceConfigVAR.Identity -LogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\EdgeSync"

Set-FrontendTransportService -Identity $exchangeservername -AgentLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\AgentLog"

Set-FrontendTransportService -Identity $exchangeservername -ConnectivityLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\Connectivity"

Set-FrontendTransportService -Identity $exchangeservername -ReceiveProtocolLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceive"

Set-FrontendTransportService -Identity $exchangeservername -SendProtocolLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpSend"

Set-ImapSettings -LogFileLocation "L:\Program Files\Microsoft\Exchange Server\V15\Logging\Imap4"

Set-MailboxServer -Identity $exchangeservername -CalendarRepairLogPath "L:\Program Files\Microsoft\Exchange Server\V15\Logging\Calendar Repair Assistant"

Set-MailboxServer -Identity $exchangeservername -MigrationLogFilePath "L:\Program Files\Microsoft\Exchange Server\V15\Logging\Managed Folder Assistant"

Set-MailboxTransportService -Identity $exchangeservername -ConnectivityLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Mailbox\Connectivity"

Set-MailboxTransportService -Identity $exchangeservername -MailboxDeliveryAgentLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Mailbox\AgentLog\Delivery"

Set-MailboxTransportService -Identity $exchangeservername -MailboxSubmissionAgentLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Mailbox\AgentLog\Submission"

Set-MailboxTransportService -Identity $exchangeservername -ReceiveProtocolLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Mailbox\ProtocolLog\SmtpReceive"

Set-MailboxTransportService -Identity $exchangeservername -SendProtocolLogPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Mailbox\ProtocolLog\SmtpSend"

Set-MailboxTransportService -Identity $exchangeservername -PipelineTracingPath "L:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Mailbox\PipelineTracing"

Unload performance monitoring

add-pssnapin Microsoft.Exchange.Management.PowerShell.Setup
remove-perfcounters –definitionfilename “C:\Program Files\Microsoft\Exchange Server\V14\Bin\perf\AMD64\eseperf.xml

pss

You can configure some of the monitoring porcesses through their config file. Search for MSExchangeHMWorker.exe.config and MSExchangeHMHost.exe.config files. In the config you can change either the max size of the log directory (MaxTraceLogDirectorySizeInBytes), the location of the logs (DefaultTraceLogPath) or disable entirely (IsTraceLoggingEnabled)

Also you can redirect IIS Logs just

Open IIS Manager
Select your server
In the Connections pane select Logging
Change the path for the log files
Note this change will apply to all of your sites hosted on the server

Posted in Exchange | Leave a comment

Exchange assessment and planning documentation

Created a documentation to help gather information for Exchange gigs and also can be used for Exchange assessment. Feel free to use and please make comments if you feel something else should be in there.

Exchange Assesment Requirements and Planning v1.1

Posted in Exchange | Leave a comment

The expert in the corporate world

Posted in Video | Leave a comment

Windows Server data deduplication

In my lab I’m running 11 Hyper-V based VMs and planning to install couple more. The total disk space they are using is 878GB on 3 different hard drive. Here is a screenshot of the usage before the dedplication.
before

In Windows Server 2012 we have a new feature called data deduplication see the Technet article about it. The data deduplication is a file server feature before you can use you need to install the file server role along with the deduplication feautre.
When you are done open up your server manager and go the File and Storage Services tab. in the new window select Disk where you can see your physical drives. You can’t enable data deduplication on the partition where the OS is residing and in this case we need to enable this feature on the 3 VM parttion/drive.
dedup01

Select “General purpose file server” and type 0 in the “Deduplicate files older…” box
dedup02

Running VMs are not supporting data deduplication jobs, you need to disable all scheduling and running the job manually after you shut down all of your running virtual boxes. Clear all check box on schedule page.
dedup03

After you shut down the virtual machines open a PowerShell prompt and start the deudplication job by running the following:
Start-DedupJob -Volume : -Type Optimization
dedup04

To check progress run
Get-DedupJob
dedup05

After running the deduplication on all of my 3 hard drive the toal usage went down to a stunning 59GB!
dedup07

Posted in Server | Leave a comment

Installing and configuring Lync 2013

da57591e-7377-46d3-959c-005816e755c4_imageType=ws_icon_large

Updated the pdf posted in the previous post. Now it’s sorta complete but with this config at least you can have a working Lync environment for internal users. I used the Enterprise version of Lync for the Standard the basics are similar.
Lync_2013_Installation_and_Configuration_step_by_step

Posted in Lync | Leave a comment