From 4c5180535e31b744fe756834b2d920a4f6ca5000 Mon Sep 17 00:00:00 2001 From: simeononsecurity <4913771+simeononsecurity@users.noreply.github.com> Date: Thu, 31 Mar 2022 02:28:21 +0000 Subject: [PATCH] Update windows10-basic.ps1 --- windows10-basic.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows10-basic.ps1 b/windows10-basic.ps1 index 93cc4fa..b507303 100644 --- a/windows10-basic.ps1 +++ b/windows10-basic.ps1 @@ -155,4 +155,9 @@ Start-Job -Name "Customizations" -ScriptBlock { } Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0 + + #Auto Update Choco Packages + $Sta = New-ScheduledTaskAction -Execute "powershell -Command 'choco upgrade all'" + $Stset = New-ScheduledTaskSettingsSet -RunOnlyIfNetworkAvailable -RunOnlyIfIdle -IdleDuration 00:02:00 -IdleWaitTimeout 02:30:00 -ExecutionTimeLimit (New-TimeSpan -Hours 1) -DontStopOnIdleEnd -WakeToRun + Register-ScheduledTask Task02 -Action $Sta -Settings $Stset }