added several more *.evtx files

This commit is contained in:
2020-09-08 22:34:34 -04:00
parent 144c44e6dc
commit 4ddad0c298
+8 -7
View File
@@ -5,19 +5,20 @@ If ( (IsWindowsVersion -ge "6.2") )
{
Write-Output "Deleting old AppX log files from ${SysTemp}"
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "AppXDeploymentServer_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-AppXDeploymentServer_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "AppxErrorReport_*.txt" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "AppXPackaging_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Application_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "System_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-WindowsUpdateClient_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-Store_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-StateRepository_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-SettingSync_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
}
## Remove computer log files
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-AppReadiness_Admin_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-AppReadiness_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "${Env:COMPUTERNAME}-*.log" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Application_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "System_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-WindowsUpdateClient_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-Store_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-StateRepository_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $SysTemp | Where { $_.Name -like "Microsoft-Windows-SettingSync_*.evtx" } | Remove-Item -Force -ErrorAction SilentlyContinue
## Remove runaway CBS logs
$CBSLogDir = "${Env:SystemRoot}\Logs\CBS"