TaskSchedulerSnapshot.Restore(TaskService.ConnectionToken, IEnumerable<String>, Boolean, Boolean, IDictionary<String, String>, CancellationToken, IProgress<Tuple<Int32, String>>) Method
Register a list of snapshot items (tasks and folders) into the specified Task Scheduler.
Namespace: Microsoft.Win32.TaskSchedulerAssembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
public Task Restore(
TaskService.ConnectionToken tsToken,
IEnumerable<string> itemPaths,
bool applyAccessRights,
bool overwriteExisting,
IDictionary<string, string> passwords,
CancellationToken cancelToken,
IProgress<Tuple<int, string>> progress
)
- tsToken TaskService.ConnectionToken
- The TaskService.ConnectionToken into which the tasks and folders are registered.
- itemPaths IEnumerable<String>
-
The list of paths representing the tasks and folders from this snapshot that should be registered on the TaskService instance.
- applyAccessRights Boolean
-
If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders.
- overwriteExisting Boolean
-
If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item.
- passwords IDictionary<String, String>
-
Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password.
- cancelToken CancellationToken
- A cancellation token to use to cancel this asynchronous operation.
- progress IProgress<Tuple<Int32, String>>
- An optional IProgress<T> instance to use to report progress of the asynchronous operation.
TaskAn asynchronous
Task instance.