Advertisement

How to Backup and Restore Scheduled Tasks in Windows 10

In this article, we will see how to backup and restore the tasks you have created in Task Scheduler. This will allow you to restore them quickly after reinstalling the operating system. You can also copy them to another PC by doing a backup first. There are several ways to do this, which we will review.

Advertisement


Task Scheduler is a special tool which comes bundled with all modern versions of Microsoft Windows. It allows the user to schedule the launch of apps, batch files, PowerShell scripts etc after specified time intervals or when certain system events occur. The Task Scheduler has a graphical MMC version (taskschd.msc) which we will use.

If you are not familiar with creation of tasks in Task Scheduler, we have a good tutorial here. Refer to the following article to learn about this topic in detail.

Create elevated shortcut to skip UAC prompt in Windows 10

How to backup a scheduled task in Windows 10

To backup a scheduled task in Windows 10, do the following.

  1. Open Administrative Tools.
  2. Click the Task Scheduler icon.Administrative Tools Control Panel
  3. In the Task Scheduler library, find a task you would like to backup. I will backup the task "Aero Glass".Task Scheduler A Task
  4. Right click the task and select "Export" in the context menu. You will be prompted to export the task as an XML file.Task Scheduler Task Context Menu
  5. Specify where to store the file and you are done.Windows 10 Backup Scheduled Task

Alternatively, you can export the task via the command prompt or PowerShell.

Backup a scheduled task in Windows 10 using Command Prompt

  1. Open an elevated command prompt.
  2. Execute the following command:
    schtasks /query /tn "Aero Glass" /xml > "c:\winaero\aero glass.xml"

    This will export the task named "Aero Glass" to the c:\winaero\aero glass.xml file.
    Correct the task name and the file path as you need.Windows 10 Backup Task Cmd

Note: If you have placed your task in some folder in Task Scheduler, don't forget to include the path to the task as follows:

schtasks /query /tn "My Folder\Aero Glass" /xml > "c:\winaero\aero glass.xml"

Backup a scheduled task in Windows 10 using PowerShell

  1. Open a new elevated PowerShell instance.
  2. Execute the following command:
    Export-ScheduledTask -TaskName "Aero Glass" > "C:\winaero\aero glass.xml"

    This will export the task named "Aero Glass" to the c:\winaero\aero glass.xml file.
    Correct the task name and the file path as needed.Windows 10 Backup Task Powershell

Note: If you have placed your task in some folder in Task Scheduler, don't forget to include the path to the task as follows:

Export-ScheduledTask -TaskName "Aero Glass" -TaskPath "\My Folder\" > "C:\winaero\aero glass.xml"

How to restore a scheduled task in Windows 10

To restore a scheduled task from backup in Windows 10, do the following.

  1. Open Administrative Tools.
  2. Click the Task Scheduler icon.
  3. In the Task Scheduler library, click the action "Import Task..." on the right.Windows 10 Restore Task
  4. Browse for your XML file and you are done.Windows 10 Import Task

Restore a scheduled task in Windows 10 using Command Prompt

  1. Open an elevated command prompt.
  2. Execute the following command:
    schtasks /create /tn "Aero Glass" /xml "c:\winaero\aero glass.xml"

    This will restore the task named "Aero Glass" from the c:\winaero\aero glass.xml file.
    Correct the task name and the file path as you need.Windows 10 Import Task Cmd

Restore a scheduled task in Windows 10 using PowerShell

  1. Open a new elevated PowerShell instance.
  2. Execute the following command:
    Register-ScheduledTask -Xml (Get-Content "c:\winaero\aero glass.xml" | out-string) -TaskName "Aero Glass"

    This will export the task named "Aero Glass" from the c:\winaero\aero glass.xml file.
    Correct the task name and the file path as you need.Windows 10 Import Task Powershell

Note: If you are going to restore the task on a different computer with different login credentials, you might need to edit the XML file and change the user name (and password) to match the target OS.Windows 10 Edit Task File

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

2 thoughts on “How to Backup and Restore Scheduled Tasks in Windows 10”

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.