external help file | Module Name | online version | schema |
---|---|---|---|
MyTasks-help.xml |
MyTasks |
2.0.0 |
Remove a MyTask item.
Remove-MyTask [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-MyTask -ID <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-MyTask -InputObject <MyTask> [-WhatIf] [-Confirm] [<CommonParameters>]
Use this command to permanently delete a MyTask work item. This will permanently delete it from the task source XML file. You can remove a task by name or use Get-MyTask to pipe a task object to this command.
As an alternative to deleting tasks, you can also archive them.
PS C:\> remove-mytask -Name "Finish DSC Training" -whatif
What if: Performing the operation "Copy File" on target "Item: C:\Users\Jeff\Documents\myTasks.xml Destination: C:\Users
\Jeff\documents\MyTasks_Backup_202060822.xml".
What if: Performing the operation "Remove-MyTask" on target "2f252083-3c8e-4823-9c7c-df55dd0d135a".
The command supports Whatif.
PS C:\> Get-myTask -Name "Finish DSC Training" | Remove-MyTask
Permanently deleting a task.
A myTask object from Get-MyTask.
Type: MyTask
Parameter Sets: Object
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Enter the task name.
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: 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
Enter a task ID number
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.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/