Disable "automatic maintenance" in Windows 8

59

33

I'm running a few VMs, and suddenly I noticed my CPU fan was spinning louder than usual. I tracked it down to Windows 8 doing some "automatic maintenance":

enter image description here

enter image description here

How can I turn this completely off? I found a way to set the time, but not a way to turn it off completely.

houbysoft

Posted 2012-11-01T07:31:30.940

Reputation: 4 276

1There are times when maintenance is completely useless and just a waste of power. In our case we have an automated test system that starts a VM from a certain snapshot, runs some tests and then reverts the VM to the snapshot. Whatever changes the OS make to itself in this time frame will be lost. The only "win" is that our tests takes >300% longer to execute. Since the maintenance task(s) also sets the "Run task as soon as possible..." option, just scheduling at another time doesn't feel solid. Besides as our tests grow, we may soon not have any other time to schedule it to. – Andreas Magnusson – 2014-10-02T07:59:17.653

Since I cannot post an answer (despite having more than 10 reputation), I'll post what we found to work for us as a comment. We have verified that this also works on the latest Win10 builds. Create the DWORD value MaintenanceDisabled under the key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance and set it to 1. – Andreas Magnusson – 2015-02-05T12:55:49.360

3I haven't researched it enough to answer definitively (So @Luke don't worry I won't make this an answer) so instead I'll say it's in scheduled tasks, but it's going to be in several places under Task Scheduler Library\Microsoft\Windows such as Diagnosis, Maintenance, etc. It's probably a bad idea to disable any of it, maybe instead schedule it for sometime when you can pause your VMs or something. Good luck. – Mark Allen – 2012-11-01T07:41:38.330

I would recommend not shutting it off completely. It's there for a reason. – Trevor Sullivan – 2012-11-08T16:50:41.270

Answers

48

You can do it by task scheduler. For this open the task scheduler by typing task on the Modern UI under the Apps and you will find the Task Scheduler at the left side click it and open. Now go to following path

Task Scheduler > Microsoft > Windows > Task Scheduler

Here you have to right click on the Idle Maintenance & Regular Maintenance and select the option disable, that's it!

enter image description here

enter image description here

If you want to enable it again then just do the reverse.

avirk

Posted 2012-11-01T07:31:30.940

Reputation: 15 151

4Windows 8.1 - the task also is reenabled after 2-3 minutes! – jitbit – 2014-07-01T14:20:41.727

4I don't have a Windows 8 at hand to test on, but on Windows Server 2012, the task gets re-enabled next time the task "Maintenance Configurator" runs, e.g. when rebooting. Also, that particular task can apparently not be disabled. – abstrask – 2013-05-03T12:29:17.050

13

Automatic maintenance does too many functions, like the updating of Windows software etc. so that turning it totally off is not advisable (or possible).

To complete the answer by nhinkle, one could at least disable it from waking your PC.

This is done in Action Center / Maintenance section / Change maintenance settings, uncheck "Allow scheduled maintenance to wake up my computer".

Together with setting the scheduled time to late at night or a time that it won't be a bother (3 AM is the default), is about the maximum possible solution.

harrymc

Posted 2012-11-01T07:31:30.940

Reputation: 306 093

That'd be great! If in fact it DID respect the scheduled time, which it doesn't on my machine. It is set for 3AM but will start immediately during the day and seemingly never stop--I keep having to stop it manually but it'll start right up again in 10 minutes. – kamranicus – 2015-01-26T15:55:51.687

@subkamran: You should post this as a separate question. – harrymc – 2015-01-27T11:41:44.957

13

The Automatic Maintenance task is a built-in scheduled task, but if you think you can just open task scheduler as an administrator and disable it you’re wrong. It will just re-enable itself on Servre 2012 as @abstrask pointed out. You'll need to use the psexec utility (Sysinternals) together with schtasks.exe, and you need to run the command as SYSTEM. Use the following command:

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

In my scenario, I was testing this on my Hyper-V host, so I simply skipped the \SERVERNAME switch.

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

Command to run Command to run

After you run the command, you can verify the task is now disabled in the Task Scheduler After you run the command, you can verify the task is now disabled in the Task Scheduler

Andrew Bucklin

Posted 2012-11-01T07:31:30.940

Reputation: 364

+1 for reminding me about PSExec's option to execute as local system – abstrask – 2015-01-30T12:20:42.533

Doesn't seem to work.. Idle Maintenance keeps reactivating itself. – Xaser – 2015-07-09T07:57:26.840

@Xaser: I just checked and it's still showing 'Disabled' on my server. Double check that you didn't make a typo I guess. – Andrew Bucklin – 2015-07-09T15:35:06.850

nope, maintenance configurator was disabled constantly gut idle maintenance not.. or was i supposed to disable idle maintenance using psexec as well? i disabled that one using the GUI – Xaser – 2015-07-09T19:50:01.350

@Xaser: Yes, try that. It's been so long that I don't remember if I used psexec to disable them both or not. – Andrew Bucklin – 2015-07-10T17:57:04.000

@AndrewBucklin tried that now, at first it seemed to work but now it just reactivates itself again.. very annoying – Xaser – 2015-07-13T07:37:47.560

@Xaser: Sorry, I don't know what's different about your configuration. Both have stayed disabled on my server for over a year now. – Andrew Bucklin – 2015-07-13T14:21:09.703

Sorry guys, complete noob here. I have saved that line as a batch file, run it as administrator and get this error output: Access denied. Connecting to local system... Couldn't install PSEXESVC service. Any idea? – natario – 2016-05-30T11:08:09.240

@miav: Although I've not experienced that error myself, I did find this which might help you: http://superuser.com/questions/540380/psexec-access-is-denied

– Andrew Bucklin – 2016-06-01T21:28:19.767

3

While you can disable the "Idle Maintenance" and "Maintenance Configurator" tasks, under \Microsoft\Windows\TaskScheduler, they will get re-enabled by the "Maintenance Configurator" task, which by default runs at 01:00 every day. In addition, it has two custom triggers, which cannot be viewed or edited using the Task Scheduler console.

Even as an admin, you don't have permission to disable the "Maintenance Configurator" task, though I haven't tried any "tricks" to do so - If Microsoft has gone through these lengths to prevent you from disabling it, it's probably a bad idea to do.

The relatively "clean" way I found to disable Idle and Regular Maintenance, that seems to still work after the "Maintenance Configurator" task has run, is to disable the triggers of the "Idle Maintenance" and "Maintenance Configurator" tasks.

The task will remain enabled, but with triggers disabled, it won't actually start.

(My answer is based on Windows Server 2012, which also has this "feature". I'm assuming it's setup the same way. Correct if I'm wrong)

abstrask

Posted 2012-11-01T07:31:30.940

Reputation: 4 714

2

There is no supported way to disable automatic maintenance altogether.

You can make changes in Group Policy to determine when maintenance should occur, and to implement a random delay to help avoid all VMs running maintenance at the same time. To open group policy settings editor, run gpedit.msc from the run dialog. These settings are under Computer Configuration > Administrative Templates > Windows Components > Maintenance Scheduler.

The scheduled tasks show up in the task scheduler (to open, type that in from the start menu) under Microsoft > Windows > Diagnostics and Microsoft > Windows > Maintenance. The events don't have any triggers specifically defined though, and the actions are "custom handlers" that can't be edited.

I did find that the executable for the maintenance tasks is MSchedExe.exe. You could potentially write a scheduled task to run shortly after the scheduled maintenance time to kill that executable right after it starts up. Not sure how reliable that would be though.

nhinkle

Posted 2012-11-01T07:31:30.940

Reputation: 35 057

2

OK, I had this invasive Auto Maintenance cause crashes, break network connections requiring reinstall of devices, and I've read about other people having all their solid state memory de-fragmented so as to reduce theri life.

Disaabling it in Task Scheduler doesn't work, it gets enabled. Try this:

ComputerMng>TaskScheduler>Microsoft>Windows>TaskScheduler>

RClick RegularMaintenance>Properties
  Conditions> "change Start the task only if idle" from 0 to 1 minute,
    else you get a "must be greater than 0" error message when saving.
  Triggers> select default 3am trigger> Edit>
    uncheck "Enabled", set to start 01/01/2111, every 100 days
  Settings> uncheck "Run ASAP after schedule missed"

If you don't like it because you think you'll still be around in 2111, then bully for you.

Another Outrage

Posted 2012-11-01T07:31:30.940

Reputation: 21

Does the tasks get re-enabled, if you also disable the "Maintenance Configurator" task? – abstrask – 2013-05-03T12:23:15.200

0

You can actually completely disable this via Group Policy in Windows 7/Server 2008r2 and later.

From http://www.blackmanticore.com/9161925e79e9d060c41e2e4160392218:

The policy can be found here: Computer Configuration\Administrative Templates\system\Troubleshooting and Diagnostics\Scheduled maintenance

And "Disabled" is one of the options. Enabling gives you the option for fully automated maintenance, or just detect and notify.

music2myear

Posted 2012-11-01T07:31:30.940

Reputation: 34 957

0

You can disable Computer Maintenance in an easy way now.

To disable the System Maintenance troubleshooter, follow these steps:

Click Startstart button, and then click Control Panel.

Under System and Security, click Find and fix problems.

Note: If System and Security is not displayed you will need to change how you are viewing Control Panel. To change your view, click the down arrow in View by and select Category. View by is located in the top right corner of the Control Panel.

On the left navigation pane, click Change settings.

Set Computer Maintenance to Off.

Reference to those step: https://support.microsoft.com/en-ca/kb/978980


enter image description here
Or you can set this registry key : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance | MaintenanceDisabled (DWORD) := 1

yagmoth555

Posted 2012-11-01T07:31:30.940

Reputation: 258

-2

There is a way turn off completely automatic maintenance. Delete from Task scheduler and that's it. No more maintenance. When I'm only disabled, after restart system maintenance start again, but if I delete it`s not working anymore.

Marcin

Posted 2012-11-01T07:31:30.940

Reputation: 9

1Deleting built-in tasks might lead to weird problems in the future, event if you don't plan on using these tasks – abstrask – 2013-05-03T12:13:24.427

Does the tasks get re-enabled, if you also disable the "Maintenance Configurator" task? – abstrask – 2013-05-03T12:22:56.730