1. Home
  2. Docs
  3. Super-ExMerge On-line Doc...
  4. PowerShell Cmdlet Referen...
  5. Remove-SyncTask

Remove-SyncTask

Use this cmdlet to remove a SyncTask from the task queue. Removed tasks are marked as removed and are purged after 14 days (except for free-use licenses, which purge after 24 hours).

Remove-SyncTask

  • -TaskID
  • [-Force]


Description

The Remove-SyncTask cmdlet removes one or more tasks from the task queue. Removing a task marks it for purge, but does not immediately remove it task. Removed tasks will not be processed by the task engine. If a task is added to the task queue, but is never started, removing the same task does not cause it to marked for removal, but is removed immediately.

Removing and adding tasks is affected by the license. Review the Licensing topic of this documentation for details about how the licenses applies.

Examples

Example 1
  Remove-SyncTask 12345678-abcd-1234-abcd-1234567890ab

This example will attempt to remove the SyncTask with the ID provided. A prompt for confirmation will occur unless the -Force parameter is also used.

Example 2
  Remove-SyncTask -TaskID 12345678-abcd-1234-abcd-1234567890ab, 00112233-aabb-ccdd-eeff-998877665544, 01020304-0000-1111-2222-010203040506 -Force

This example will attempt to remove 3 tasks and no confirmation will be prompted.

Example 3
  
$tasks = Get-SyncTask | Where-Object {$_.State -eq 'Completed'}
Remove-SyncTask -TaskID $tasks

This example requests all the Completed sync tasks from the system and attempt to remove them. The Remove-SyncTask cmdlet will attempt to find a ‘TaskID’ property on objects passed to it.

Example 4
  
$tasks = Get-SyncTask | Where-Object {$_.State -eq 'Completed'}
$tasks | Remove-SyncTask -Force

This example will use pipelining to pass the list of Completed tasks to the cmdlet and will attempt to remove each without a prompt.


Parameters

-TaskID

The TaskID parameter specifies one or more tasks that are to be removed.

Required:
Yes
Type:
Guid (Array)
Aliases:
None
Position:
0
Default Value:
None

-Force

The Force parameter determines whether a confirmation prompt is shown to accept the removal.

Required:
No
Type:
SwitchParameter
Aliases:
None
Position:
Not a positioned parameter. Use by name only.
Default Value:
False

Output

This cmdlet will place a numeric value on the pipeline indicating the number of tasks that were removed.

How can we help?