From d35721e953e1f45185e0a5008ad63ccda8bb3e59 Mon Sep 17 00:00:00 2001 From: farag2 Date: Mon, 24 Dec 2018 11:50:55 +0300 Subject: [PATCH] Update Win 10.ps1 --- Win 10.ps1 | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Win 10.ps1 b/Win 10.ps1 index 90e8f7d9..0037eebc 100644 --- a/Win 10.ps1 +++ b/Win 10.ps1 @@ -384,23 +384,6 @@ $params = @{ "Principal" = $principal } Register-ScheduledTask @Params -Force -# Включение в Планировщике задач удаление устаревших обновлений Office, кроме Office 2019 -$action = New-ScheduledTaskAction -Execute "Powershell.exe" -Argument @" -`$getservice = Get-Service -Name wuauserv -`$getservice.WaitForStatus('Stopped', '01:00:00') -Start-Process -FilePath D:\Программы\Прочее\Office_task.bat -"@ -$trigger = New-ScheduledTaskTrigger -Weekly -At 9am -DaysOfWeek Thursday -WeeksInterval 4 -$settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable -$principal = New-ScheduledTaskPrincipal -UserID System -RunLevel Highest -$params = @{ -"TaskName" = "Office" -"Action" = $action -"Trigger" = $trigger -"Settings" = $settings -"Principal" = $principal -} -Register-ScheduledTask @Params -Force # Включить в Планировщике задач очистки папки %SYSTEMROOT%\Logs\CBS $action = New-ScheduledTaskAction -Execute "Powershell.exe" -Argument @" `$dir = "$env:SystemRoot\Logs\CBS"