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

Get-SyncTask

Use this cmdlet to get a ServiceTaskItem from the task queue.

Get-SyncTask

    • [-TaskID]

    Get-SyncTask

      • [-TaskIDsOnly]

      Get-SyncTask

        • [-States]

        Description

        The Get-SyncTask cmdlet is used to retrieve information about SyncTasks in the task queue. The cmdlet does not remove tasks, and changes to the returned object does not cause changes unless the task object is used as a parameter in Set-SyncTask.

        The cmdlet can get detail about a single task, can list all tasks, can list all tasks only by their TaskID values, and can list tasks that match one or more WorkStatus status values. It is common to use this cmdlet to get a list of all completed or processing tasks.

        This cmdlet does not retrieve information about removed tasks. Use Show-RemovedTasks to show information about removed tasks.

        Examples

        Example 1
          Get-SyncTask
        

        This example, without parameters will list all sync tasks in all states in the task queue.

        Example 2
          Get-SyncTask -TaskID 12345678-ABCD-EF01-1234567890AB
        

        This example will get a ServiceTaskItem for the provided TaskID, if one is found in the task queue. If no match is found, nothing is returned.

        Example 3
          Get-SyncTask -TaskIDsOnly
        

        This example will simply list all tasks, in all states, and will only output the TaskID for each item.

        Example 4
          Get-SyncTask -States Completed, Processing
        

        This example will filter the resulting list of ServiceTaskItem objects to only those that are either in a Completed or Processing state.


        Parameters

        -TaskID

        This parameter uniquely identifies a specific task in the task queue. If no task matches this ID, no object is returned.

        Required:
        No
        Type:
        Guid
        Aliases:
        None
        Position:
        0
        Default Value:
        00000000-0000-0000-000000000000

        -TaskIDsOnly

        This parameters is used to list all tasks by their TaskID value only.

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

        -States

        This parameter is a list of one or more WorkStatus values that filter the returned data to only those tasks that match the states requested.

        The following WorkStatus values exist: Unknown, New, Unstarted, Reset, Starting, Processing, Completing, Completed, Canceled, Exited, Excluded, Removed, Error, ErrorStartingProcess

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

        -TaskName

        The TaskName parameter specifies the name or wildcard pattern of a sync task. Wildcard patterns used the same filtering as would be used for filtering files, namely the * and ? characters.

        Required:
        No
        Type:
        String
        Aliases:
        None
        Position:
        0
        Default Value:
        None

        Output

        This cmdlet will place one or more PSObject objects on the pipeline.

        When this cmdlet is used with no parameters, the -TaskID parameter, or the -States parameter, the following properties exist on the object(s) returned:

        QueuePositionThe relative position in the task queue. Multiple objects can have the same QueuePosition, in which case they are in the order in which they were added.
        TaskNameThe name of the task.
        StartOnOrAfterA date value that determines the soonest at which the task engine may start the task. If not set, the task will start based on its QueuePosition
        TaskIDThe unique task ID
        StateThe WorkStatus value for the task.
        TaskThe SyncTask object. This is the type of object that New-SyncTask creates.

        When this cmdlet is used with the -TaskIDsOnly switch parameter, a list of TaskID values (Guid) is placed on the pipeline.

        How can we help?