external help file | Module Name | online version | schema |
---|---|---|---|
MyTasks-help.xml |
MyTasks |
2.0.0 |
Mark a MyTask item as completed.
Complete-MyTask [-Name] <String> [-CompletedDate <DateTime>] [-Archive] [-Passthru] [-WhatIf] [-Confirm]
[<CommonParameters>]
Complete-MyTask [-Task <MyTask>] [-CompletedDate <DateTime>] [-Archive] [-Passthru] [-WhatIf] [-Confirm]
[<CommonParameters>]
Complete-MyTask -ID <Int32> [-CompletedDate <DateTime>] [-Archive] [-Passthru] [-WhatIf] [-Confirm]
[<CommonParameters>]
Use this command to mark a MyTask work item as completed. This will automatically set the progress to 100% and mark the item as completed. It will not remove it from the source XML file unless you use the -Archive parameter. This will complete the task and move it to the default archive file, myTasksArchive.xml.
PS C:\> Get-MyTask -id 6 | Complete-MyTask -Passthru
ID Name Description DueDate OverDue Category Progress
-- ---- ----------- ------- ------- -------- --------
6 Update Server03 10/14/2020 False work 100
Get MyTask with an ID of 6 and mark it as complete. By default nothing is written to the pipeline unless you use -Passthru.
PS C:\> Complete-MyTask -Name "setup CEO laptop" -archive
Mark the task as completed and archive it to the myTasksArchive.xml file.
PS C:\> Complete-MyTask -Name "update-resume" -CompletedDate "4/1/2020 4:00PM"
Mark the task as completed using the specified date.
Move the task to the default archive file. There is no provision for specifying an alternate file.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Enter the name of a task.
Type: String
Parameter Sets: Name
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A MyTask item.
Type: MyTask
Parameter Sets: Task
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The date you completed the task. The default is the now.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Enter the task ID
Type: Int32
Parameter Sets: ID
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/