Mit folgendem Script werden die meisten, per default aktivierten, Log-Files auf ein anderes Volume gelegt. Im Skript wird davon ausgegeangen, das der Installations-Pfad C:\Program Files\… ist

Der „alte“ Pfad wird in der ersten Zeile Angegeben.
Der Ziel-Pfad kann in der zweiten Zeile angepasst werden.

$Source = "C:\Program Files\Microsoft\Exchange Server\V15\"
$Dest = "D:\Exchange\Logs\"

$Log = Get-TransportService $env:computername | select *logpath

$ConnectivityLogPath = $Log.ConnectivityLogPath.PathName.replace($Source,$Dest)
$MessageTrackingLogPath = $Log.MessageTrackingLogPath.PathName.replace($Source,$Dest)
$IrmLogPath = $Log.IrmLogPath.PathName.replace($Source,$Dest)
$ActiveUserStatisticsLogPath = $Log.ActiveUserStatisticsLogPath.PathName.replace($Source,$Dest)
$ServerStatisticsLogPath = $Log.ServerStatisticsLogPath.PathName.replace($Source,$Dest)
$ReceiveProtocolLogPath = $Log.ReceiveProtocolLogPath.PathName.replace($Source,$Dest)
$RoutingTableLogPath = $Log.RoutingTableLogPath.PathName.replace($Source,$Dest)
$SendProtocolLogPath = $Log.SendProtocolLogPath.PathName.replace($Source,$Dest)
$QueueLogPath = $Log.QueueLogPath.PathName.replace($Source,$Dest)
$GeneralLogPath = $Log.GeneralLogPath.PathName.replace($Source,$Dest)
$WlmLogPath = $Log.WlmLogPath.PathName.replace($Source,$Dest)
$AgentLogPath = $Log.AgentLogPath.PathName.replace($Source,$Dest)

New-Item -itemtype directory -path $ConnectivityLogPath
New-Item -itemtype directory -path $MessageTrackingLogPath
New-Item -itemtype directory -path $IrmLogPath
New-Item -itemtype directory -path $ActiveUserStatisticsLogPath
New-Item -itemtype directory -path $ServerStatisticsLogPath
New-Item -itemtype directory -path $ReceiveProtocolLogPath
New-Item -itemtype directory -path $RoutingTableLogPath
New-Item -itemtype directory -path $SendProtocolLogPath
New-Item -itemtype directory -path $QueueLogPath
New-Item -itemtype directory -path $WlmLogPath
New-Item -itemtype directory -path $AgentLogPath

Set-TransportService $env:computername -ConnectivityLogPath $ConnectivityLogPath -MessageTrackingLogPath $MessageTrackingLogPath -IrmLogPath $IrmLogPath -ActiveUserStatisticsLogPath $ActiveUserStatisticsLogPath -ServerStatisticsLogPath $ServerStatisticsLogPath -ReceiveProtocolLogPath $ReceiveProtocolLogPath -RoutingTableLogPath $RoutingTableLogPath -SendProtocolLogPath $SendProtocolLogPath -QueueLogPath $QueueLogPath -WlmLogPath $WlmLogPath -AgentLogPath $AgentLogPath

$Log = Get-Mailboxserver $env:computername | select *logpath*

$CalendarRepairLogPath = $Log.CalendarRepairLogPath.PathName.replace($Source,$Dest)
$LogPathForManagedFolders = $Log.LogPathForManagedFolders.PathName.replace($Source,$Dest)

New-Item -itemtype directory -path $CalendarRepairLogPath 
New-Item -itemtype directory -path $LogPathForManagedFolders

Set-Mailboxserver $env:computername -CalendarRepairLogPath $CalendarRepairLogPath -LogPathForManagedFolders $LogPathForManagedFolders

 

Exchange 2016: Log-Files-Speicherort ändern

Das könnte dir auch gefallen

Schreibe einen Kommentar