Use this cmdlet to show statistics for one or more completed sync tasks.
PowerShell
Show-CompletedTaskStats
- [-TaskID]
Description
The Show-CompletedTaskStats will list numeric statistics such as items copied and modified for one or more tasks.
When a sync task completes, or is cancelled, the sync stats generated during the sync session are stored on the sync task and saved into the task queue. As such, the statistics may be inaccurate for a task that was cancelled. Additionally, if a task is in process when this cmdlet is called, the stats will show the stats from the last completed execution, not the current stats for the active task. The Timestamp property of the stats object can be used to understand when the stats object was created.
Examples
Example 1
PowerShell
Show-CompletedTaskStats TaskID : a67c4735-2230-4b08-be73-a45e22b9dba6 TaskName : Sync from [Mailbox] joe@sourcecom to [PST] joes.pst ------------------------------- : Timestamp : 6/7/2019 12:22:05 PM SourceFoldersEnumerated : 0 SourceFoldersAnalyzed : 0 SourceFoldersCreated : 0 SourceFoldersDeleted : 0 SourceFoldersSkipped : 0 SourceFoldersSkippedUnsupported : 0 SourceFoldersUpdated : 0 TargetFoldersEnumerated : 0 TargetFoldersAnalyzed : 0 TargetFoldersCreated : 0 TargetFoldersDeleted : 0 TargetFoldersSkipped : 0 TargetFoldersSkippedUnsupported : 0 TargetFoldersUpdated : 0 SourceItemsEnumerated : 0 SourceItemsAnalyzed : 0 SourceItemsCopiedToTarget : 0 SourceItemsCopyVerified : 0 SourceItemsUpdatedInTarget : 0 TargetItemsDeletedDueToSourceDeletion : 0 TargetItemsEnumerated : 0 TargetItemsAnalyzed : 0 TargetItemsCopiedToTarget : 0 TargetItemsCopyVerified : 0 TargetItemsUpdatedInSource : 0 SourceItemsDeletedDueToTargetDeletion : 0 TotalItemsToProcess : 0 TotalItemsProcessed : 0 TotalItemsWithNoChanges : 0 TotalItemsSkipped : 0 TotalItemsFailed : 0 TotalCalendarItemsFixed : 0 TaskID : adfc1245-3432-5346-72d1-1f3627a5b9e2 TaskName : Sync from [Mailbox] rick@sourcecom to [PST] ricks.pst ------------------------------- : Timestamp : 6/7/2019 1:22:05 PM SourceFoldersEnumerated : 0 SourceFoldersAnalyzed : 0 SourceFoldersCreated : 0 SourceFoldersDeleted : 0 SourceFoldersSkipped : 0 SourceFoldersSkippedUnsupported : 0 SourceFoldersUpdated : 0 TargetFoldersEnumerated : 0 TargetFoldersAnalyzed : 0 TargetFoldersCreated : 0 TargetFoldersDeleted : 0 TargetFoldersSkipped : 0 TargetFoldersSkippedUnsupported : 0 TargetFoldersUpdated : 0 SourceItemsEnumerated : 0 SourceItemsAnalyzed : 0 SourceItemsCopiedToTarget : 0 SourceItemsCopyVerified : 0 SourceItemsUpdatedInTarget : 0 TargetItemsDeletedDueToSourceDeletion : 0 TargetItemsEnumerated : 0 TargetItemsAnalyzed : 0 TargetItemsCopiedToTarget : 0 TargetItemsCopyVerified : 0 TargetItemsUpdatedInSource : 0 SourceItemsDeletedDueToTargetDeletion : 0 TotalItemsToProcess : 0 TotalItemsProcessed : 0 TotalItemsWithNoChanges : 0 TotalItemsSkipped : 0 TotalItemsFailed : 0 TotalCalendarItemsFixed : 0
This example, used without the TaskID parameter will list statistics for each task in the task queue. In this example there were 2 tasks with statistical information.
The example shows the values with all zeros only as an example and to show the set of properties that are returned.
The result can be limited to a single task if the TaskID parameter is used. A pipelined list of tasks can also be sent to this cmdlet in order to output stats for several tasks.
Parameters
-TaskID
The TaskID parameter specifies the task from the task queue for which to show detail. If the task does not have any stats, a warning message will be shown for that task.
If this parameter is not used, the cmdlet will enumerate all tasks in the task queue and show stats for the tasks that have data.
Output
This cmdlet will place one or more PSObject items on the pipeline, if any exist, and will have the following properties:
| Timestamp | The date and time the statistics data was written to the object. |
| SourceFoldersEnumerated | The number of folders that were found and enumerated from the source store, based on the starting folder configured, if any. |
| SourceFoldersAnalyzed | The number of folders that were analyzed. Folder analysis is the process of determining the folder stated, for example new vs modified. |
| SourceFoldersCreated | The number of folders created in the source as a result of new folders having been found in the target |
| SourceFoldersDeleted | The number of folders deleted in the source as a result of the same folder showing as deleted in the target. |
| SourceFoldersSkipped | The number of folders skipped due to an exclusion. |
| SourceFoldersSkippedUnsupported | The number of folders skipped as unsupported. An Exchange mailbox, for example, has some hidden folders that are skipped. |
| SourceFoldersUpdated | The number of folders that have been updated in the source as a result of the related folder in the target showing a recent modification. |
| TargetFoldersEnumerated | The number of folders that were found and enumerated from the target store, based on the starting folder configured, if any. |
| TargetFoldersAnalyzed | The number of folders that were analyzed. Folder analysis is the process of determining the folder stated, for example new vs modified. |
| TargetFoldersCreated | The number of folders created in the target as a result of new folders having been found in the source |
| TargetFoldersDeleted | The number of folders deleted in the target as a result of the same folder showing as deleted in the source. |
| TargetFoldersSkipped | The number of folders skipped due to an exclusion. |
| TargetFoldersSkippedUnsupported | The number of folders skipped as unsupported. An Exchange mailbox, for example, has some hidden folders that are skipped. |
| TargetFoldersUpdated | The number of folders that have been updated in the target as a result of the related folder in the source showing a recent modification. |
| SourceItemsEnumerated | The number of items found during folder analysis operations. |
| SourceItemsAnalyzed | The number of items analyzed. Item analysis determines the state of each item such as New, Modified, or Deleted. |
| SourceItemsCopiedToTarget | The number of items found as new in the source and copied to the target. |
| SourceItemsCopyVerified | The number of items verified as copied into the target folder. Note that item copies are made, then a second thread validates that the item was successfully copied. |
| SourceItemsUpdatedInTarget | The number of items updated in the target that were updated as a result of a source item being modified. |
| TargetItemsDeletedDueToSourceDeletion | The number of items deleted in the target that have been deleted as a result of the related item in the source showing as deleted. |
| TargetItemsEnumerated | The number of items found during folder analysis operations. |
| TargetItemsAnalyzed | The number of items analyzed. Item analysis determines the state of each item such as New, Modified, or Deleted. |
| TargetItemsCopiedToSource | The number of items found as new in the target and copied to the source. |
| TargetItemsCopyVerified | The number of items verified as copied into the target folder. Note that item copies are made, then a second thread validates that the item was successfully copied. |
| TargetItemsUpdatedInSource | The number of items updated in the source that were updated as a result of a target item being modified. |
| SourceItemsDeletedDueToTargetDeletion | The number of items deleted in the source that have been deleted as a result of the related item in the target showing as deleted. |
| TotalItemsToProcess | The total number of items that were queued for processing during the sync session |
| TotalItemsProcessed | The total number of items that were processed by the sync at the time the stats record was written. |
| TotalItemsWithNoChanges | The total number of items that were processed but no changes were found on either the source or target item. |
| TotalItemsSkipped | The total number of items skipped due to a date range filter. |
| TotalItemsFailed | The total number of items that failed to sync. |
| TotalCalendarItemsFixed | The total number of Calendar items that were ‘fixed’. ‘Fixing’ a calendar item is the resetting of the Organizer property to reflect the destination mailbox, where appropriate. |
