How to Disable Automatic Maintenance Task in Windows Server 2016 (TiWorker.exe CPU Fix)


7 views

Many sysadmins remember using these classic commands to disable automatic maintenance in Windows Server 2012 R2:

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

But in Windows Server 2016, Microsoft changed the task scheduler architecture, and these paths no longer exist. Yet we still see TiWorker.exe consuming CPU cycles during mysterious maintenance windows.

The automatic maintenance tasks have been relocated in Server 2016. Here's how to discover them:

# List all maintenance-related tasks
schtasks /query /fo LIST | findstr /i "maintenance"

You'll typically find these key tasks in Server 2016:

  • \Microsoft\Windows\Maintenance\WinSAT
  • \Microsoft\Windows\TaskScheduler\Regular Maintenance
  • \Microsoft\Windows\Chkdsk\SyspartRepair

Here are three methods to control these tasks:

# Method 1: Disable via Task Scheduler (GUI)
taskschd.msc → Task Scheduler Library → Microsoft → Windows → Maintenance

# Method 2: Command line disable
schtasks /change /tn "\Microsoft\Windows\Maintenance\WinSAT" /DISABLE
schtasks /change /tn "\Microsoft\Windows\TaskScheduler\Regular Maintenance" /DISABLE

# Method 3: PowerShell (for remote servers)
Invoke-Command -ComputerName SERVER01 -ScriptBlock {
    Disable-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "WinSAT"
}

If you prefer to keep maintenance but control when it runs:

# View current maintenance settings
Get-ScheduledTask -TaskPath "\Microsoft\Windows\TaskScheduler\" | 
Where-Object {$_.TaskName -like "*Maintenance*"} | 
Get-ScheduledTaskInfo | Format-List

# Set custom maintenance window
$task = Get-ScheduledTask -TaskName "Regular Maintenance"
$task.Triggers[0].StartBoundary = "2019-01-01T03:00:00"
$task.Triggers[0].Repetition.Interval = "P1D"
$task | Set-ScheduledTask

After making changes, verify with these commands:

# Check task status
schtasks /query /tn "\Microsoft\Windows\Maintenance\WinSAT" /v

# Monitor TiWorker.exe activity
Get-Process TiWorker | Select-Object Id,CPU,StartTime

Remember that some maintenance tasks are critical for system health. Consider testing these changes in a non-production environment first.


html

Many sysadmins who previously disabled Automatic Maintenance in Windows Server 2012/R2 using the classic schtasks method find that the same approach doesn't work in Server 2016. The infamous Maintenance Configurator task either doesn't exist or has been relocated.

If you notice TiWorker.exe consuming CPU cycles, it's a clear sign that Automatic Maintenance is active. This process handles Windows Update and other system maintenance tasks, often at inconvenient times.

The task scheduler path changed in Server 2016. Here are the updated commands to disable it:

# First disable the main trigger
schtasks /Change /TN "\Microsoft\Windows\TaskScheduler\Regular Maintenance" /DISABLE

# Then disable the idle maintenance
schtasks /Change /TN "\Microsoft\Windows\TaskScheduler\Idle Maintenance" /DISABLE

# Optional: Disable Automatic Updates completely (if needed)
Stop-Service -Name wuauserv -Force
Set-Service -Name wuauserv -StartupType Disabled

Run this PowerShell snippet to confirm maintenance is disabled:

Get-ScheduledTask | Where-Object {$_.TaskPath -like "*Maintenance*"} | 
    Select-Object TaskName,State | Format-Table -AutoSize

For environments where Group Policy isn't available, you can modify the registry:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" /v MaintenanceDisabled /t REG_DWORD /d 1 /f

Remember that disabling maintenance means you'll need to manually handle:

  • Windows Updates
  • Disk cleanup operations
  • System file integrity checks

For production environments, consider using a maintenance window instead of complete disablement:

# Set specific maintenance window (2AM-4AM daily)
schtasks /Change /TN "\Microsoft\Windows\TaskScheduler\Regular Maintenance" /ST 02:00 /RI 120 /DU 02:00