Windows – Disable Automatic Maintenance Windows Server 2016

windowswindows-server-2016

When using Server 2012 I disabled the (evil) Automatic Maintenance task using the following commands (originally found here):

psexec \\SERVERNAME -s schtasks /change /tn "\Microsoft\Windows\TaskScheduler\Maintenance Configurator" /DISABLE
psexec -s schtasks /change /tn "\Microsoft\Windows\TaskScheduler\Maintenance Configurator" /DISABLE

When I try to run this on Server 2016 those entries do not exist. I know it is somewhere because TiWorker.exe eats up a bunch of CPU doing whatever it does. Does anyone know where this setting is in Server 2016?

Best Answer

Looks like that task isn't included in Server 2016. I verified this on a fresh install. Windows appears to run the maintenance scheduled tasks individually now.

The one that runs tiworker and the one that I'm finding the most intrusive is the SilentCleanup task, which runs disk cleanup whether the disk space is low or not, counter to its description. That one can be found under the DiskCleanup folder. I think I'm going to disable this task across the board since there is no reason a server should be running automatic disk cleanup IMO.

Edit: I found a way to check what all the maintenance tasks are:

$MaintTasks = @()
foreach ($task in (Get-ScheduledTask))
{
if (($task | Export-ScheduledTask) -like “*maintenance*”) {$MaintTasks += $task}
}
$MaintTasks