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

Reset-QueuePosition

Use this cmdlet to reorder the QueuePosition on multiple SyncTasks in the task queue.

Reset-QueuePosition

      Reset-QueuePosition

        • [-ResetAllTasks]
        • [-StartingPosition]
        • [-Interval]

        Reset-QueuePosition

          • [-TaskID]
          • [-StartingPosition]
          • [-Interval]


          Description

          The Reset-QueuePosition cmdlet is used to reorder SyncTask objects in the task queue in series.

          This cmdlet is useful for cases where many tasks have been added with the same QueuePosition, which is common because the QueuePosition parameter of Add-SyncTask is not required and defaults to zero. As such, if many objects were added to the task queue using the default value, all of those tasks will have the same QueuePosition and will be processed in the order in which they were added.
          This cmdlet can set new QueuePosition values on those tasks in sequential order so that each task has an explicit QueuePosition. Additionally, through the use of the -Interval parameter, the new QueuePosition values can be incremented at a set interval in order to create some spacing between the tasks in case of the later need to insert a task between two others.

          Examples

          Example 1
            
          Reset-QueuePosition
          

          This example will reorder all tasks in the task queue starting from zero and incrementing each new value by one.

          Example 2
            
          Reset-QueuePosition -StartingPosition 100 -Interval 10
          

          This example will reset the QueuePosition of all tasks in the task queue starting at 100 and incrementing by 10 for each. Example: 100, 110, 120, 130, 140, etc.

          Example 3
            
          $tasks = Get-SyncTask -States Completed
          $tasks | Reset-QueuePosition -Interval 5
          

          This example retrieves all the completed tasks from the task queue and reorders them, starting from zero, and incrementing by five.


          Parameters

          -ResetAllTasks

          The ResetAllTasks parameter determines whether all the task in the task queue are reordered.

          Required:
          Yes
          Type:
          SwitchParameter
          Aliases:
          None
          Position:
          0
          Default Value:
          False

          -TaskID

          The TaskID parameter specifies the task in the task queue that is to be updated.

          This parameter is a single value property and is expected to be used with a pipeline of values being passed to the cmdlet as shown in Example #3

          Required:
          Yes
          Type:
          Guid
          Aliases:
          None
          Position:
          0
          Default Value:
          Guid.Empty

          -StartingPosition

          The StartingPosition parameter specifies the value at which the QueuePosition starts. The number increases for each successive task based on the -Interval parameter.

          Required:
          No
          Type:
          Integer
          Aliases:
          None
          Position:
          1
          Default Value:
          0

          -Interval

          The Interval parameter specifies the value that the QueuePosition is increase on each iteration.

          Required:
          No
          Type:
          Byte
          Aliases:
          None
          Position:
          2
          Default Value:
          1

          Output

          This cmdlet places no data on the pipeline.

          How can we help?