|
@ -13570,8 +13570,15 @@ while ([WinAPI.Focus]::GetFocusAssistState() -ne "OFF") |
|
|
# Run the task |
|
|
# Run the task |
|
|
Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force |
|
|
Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_.CreationTime -lt (Get-Date).AddDays(-1)} | Remove-Item -Recurse -Force |
|
|
|
|
|
|
|
|
# This the only way to get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent |
|
|
# Unnecessary folders to remove |
|
|
Remove-Item -Path (-join ("`$env:SystemDrive\", '$WinREAgent')) -Recurse -Force |
|
|
`$Paths = @( |
|
|
|
|
|
# Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent |
|
|
|
|
|
(-join ("`$env:SystemDrive\", '`$WinREAgent')), |
|
|
|
|
|
(Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName, |
|
|
|
|
|
"`$env:SystemDrive\Intel", |
|
|
|
|
|
"`$env:SystemDrive\PerfLogs" |
|
|
|
|
|
) |
|
|
|
|
|
Remove-Item -Path `$Paths -Recurse -Force |
|
|
|
|
|
|
|
|
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null |
|
|
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null |
|
|
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null |
|
|
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null |
|
|