include application_*.evtx files
This commit is contained in:
@@ -7,6 +7,7 @@ If ( (IsWindowsVersion -ge "6.2") )
|
||||
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "AppXDeploymentServer_*.evtx" } | Remove-Item -Force
|
||||
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "AppxErrorReport_*.txt" } | Remove-Item -Force
|
||||
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "AppXPackaging_*.evtx" } | Remove-Item -Force
|
||||
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Application_*.evtx" } | Remove-Item -Force
|
||||
}
|
||||
|
||||
## Remove runaway CBS logs
|
||||
@@ -20,7 +21,7 @@ If ( Test-Path $CBSLogDir )
|
||||
## Remove all system temp files older than the specified number of days
|
||||
$OlderThan=7
|
||||
$timedelta = New-TimeSpan -Days $OlderThan
|
||||
Write-Output "Deleting all files older than ${OlderThan} day(s) from ${SysTemp}"
|
||||
Write-Output "Deleting all files more than ${OlderThan} day(s) old ${SysTemp}"
|
||||
Foreach ( $item in (Get-ChildItem -Path "${SysTemp}") )
|
||||
{
|
||||
## If it's older than the number of days specified, recursively delete the directory
|
||||
|
||||
Reference in New Issue
Block a user