Hello,
I have already moved the database to a separate RAID5 array and would now like to move all log files to a separate RAID1 array. I have found this script:
--------------------------------------------------------------------------------------------------------------------------------------------
# MoveMail1logs.ps1
# Version 1.0 by KSB
# This script will move all of the configurable logs for Exchange 2013 from the C: drive
# to the L: drive. The folder subtree and paths on L: will stay the same as they were on C:
#
# Get the name of the local computer and set it to a variable for use later on.
$exchangeservername = $env:mail1
# Move the standard log files for the TransportService to the same path on the L: drive that they were on C:
Set-TransportService -Identity $exchangeservername `
-ConnectivityLogPath "E:\TransportRoles\Logs\Hub\Connectivity" `
-MessageTrackingLogPath "E:\TransportRoles\Logs\MessageTracking" `
-IrmLogPath "E:\Logging\IRMLogs" `
-ActiveUserStatisticsLogPath "E:\TransportRoles\Logs\Hub\ActiveUsersStats" `
-ServerStatisticsLogPath "E:\TransportRoles\Logs\Hub\ServerStats" `
-ReceiveProtocolLogPath "E:\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive" `
-RoutingTableLogPath "E:\TransportRoles\Logs\Hub\Routing" `
-SendProtocolLogPath "E:\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend" `
-QueueLogPath "E:\TransportRoles\Logs\Hub\QueueViewer" `
-WlmLogPath "E:\TransportRoles\Logs\Hub\WLM" `
-PipelineTracingPath "E:\TransportRoles\Logs\Hub\PipelineTracing" `
-AgentLogPath "E:\TransportRoles\Logs\Hub\AgentLog"
# move the path for the PERFMON logs from the C: drive to the L: drive
logman -stop ExchangeDiagnosticsDailyPerformanceLog
logman -update ExchangeDiagnosticsDailyPerformanceLog -o "E:\Logging\Diagnostics\DailyPerformanceLogs\ExchangeDiagnosticsDailyPerformanceLog"
logman -start ExchangeDiagnosticsDailyPerformanceLog
logman -stop ExchangeDiagnosticsPerformanceLog
logman -update ExchangeDiagnosticsPerformanceLog -o "E:\Logging\Diagnostics\PerformanceLogsToBeProcessed\ExchangeDiagnosticsPerformanceLog"
logman -start ExchangeDiagnosticsPerformanceLog
------------------------------------------------------------------
# Get the details on the EdgeSyncServiceConfig and store them in a variable for use in setting the path
$EdgeSyncServiceConfigVAR=Get-EdgeSyncServiceConfig
# Move the Log Path using the variable we got
Set-EdgeSyncServiceConfig -Identity $EdgeSyncServiceConfigVAR.Identity -LogPath "E:\TransportRoles\Logs\EdgeSync"
------------------------------------------------------------------
# Move the standard log files for the FrontEndTransportService to the same path on the L: drive that they were on C:
Set-FrontendTransportService -Identity $exchangeservername `
-AgentLogPath "E:\TransportRoles\Logs\FrontEnd\AgentLog" `
-ConnectivityLogPath "E:\TransportRoles\Logs\FrontEnd\Connectivity" `
-ReceiveProtocolLogPath "E:\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceive" `
-SendProtocolLogPath "E:\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpSend"
# MOve the log path for the IMAP server
Set-ImapSettings -LogFileLocation "E:\Logging\Imap4"
# Move the logs for the MailBoxServer
Set-MailboxServer -Identity $exchangeservername `
-CalendarRepairLogPath "E:\Logging\Calendar Repair Assistant" `
-MigrationLogFilePath "E:\Logging\Managed Folder Assistant"
# Move the standard log files for the MailboxTransportService to the same path on the L: drive that they were on C:
Set-MailboxTransportService -Identity $exchangeservername `
-ConnectivityLogPath "E:\TransportRoles\Logs\Mailbox\Connectivity" `
-MailboxDeliveryAgentLogPath "E:\TransportRoles\Logs\Mailbox\AgentLog\Delivery" `
-MailboxSubmissionAgentLogPath "E:\TransportRoles\Logs\Mailbox\AgentLog\Submission" `
-ReceiveProtocolLogPath "E:\TransportRoles\Logs\Mailbox\ProtocolLog\SmtpReceive" `
-SendProtocolLogPath "E:\TransportRoles\Logs\Mailbox\ProtocolLog\SmtpSend" `
-PipelineTracingPath "E:\TransportRoles\Logs\Mailbox\PipelineTracing"
# MOve the log path for the POP3 server
Set-PopSettings -LogFileLocation "E:\Logging\Pop3"
--------------------------------------------------------------------------------------------------------------------------------------------
All of it looks pretty straight forward except for a couple lines which are:
# Get the details on the EdgeSyncServiceConfig and store them in a variable for use in setting the path
$EdgeSyncServiceConfigVAR=Get-EdgeSyncServiceConfig
# Move the Log Path using the variable we got
Set-EdgeSyncServiceConfig -Identity $EdgeSyncServiceConfigVAR.Identity -LogPath "E:\TransportRoles\Logs\EdgeSync"
If I run the $EdgeSyncServiceConfigVAR=Get-EdgeSyncServiceConfig it sounds like it should give me a variable in return to use in the next line but running that command returns nothing. It looks like it runs successfully but just puts me back at the prompt.
Should it return something or is it just setting the variable to $EdgeSyncServiceConfigVAR and I should just run the next line as is after changing the path I want?
Does anyone have experience with this script?
Are these ALL the log files to move?
Thanks,
Jeff