刪除Exchange2013 日誌 命令,刪除前一天日誌

$count=0
$mbxlogs =Get-ChildItem -Include *.log -Recurse -Path "D:\Program Files\Microsoft\Exchange Server\V15\Mailbox"
$mbxlogs | %{if ($_.LastAccessTime -lt (Get-Date).AddDays(-1)) {Remove-Item $_ -Confirm:$false;$count++;$count}}
相關文章
相關標籤/搜索