Files
management-scripts/Cleanup-LogFiles.ps1
T
2020-05-22 14:35:46 -04:00

3 lines
250 B
PowerShell

## This script will delete runaway CBS logs that can take up 100's of GB on an endpoint
Get-ChildItem -Path "${Env:WINDIR}\Logs\CBS" -File | Where { ( $_.Name -like "CbsPersist_*.log" ) -or ( $_.Name -like "CbsPersist_*.cab" ) } | Remove-Item -Force