external help file | Module Name | online version | schema |
---|---|---|---|
PSWorkItem-help.xml |
PSWorkItem |
2.0.0 |
Modify an existing PSWorkItem
Set-PSWorkItem [-ID] <Int32> [-Name <String>] [-Description <String>]
[-DueDate <DateTime>] [-Category <String>] [-Progress <Int32>] [-Path <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-PSWorkItem [-ID] <Int32> [-Path <String>] [-PassThru] [-ClearDescription] [-WhatIf] [-Confirm] [<CommonParameters>]
When you need to update a task, use Set-PSWorkItem. You need to use the PSWorkItem ID to identify the item to be updated. You can then update the Name, Description, DueDate, Category, and Progress.
If you want to clear the Description, use the -ClearDescription parameter. All other properties will remain untouched.
PS C:\> Set-PSWorkItem -id 3 -progress 10
Set the progress on a PSWorkItem.
PS C:\> Get-PSWorkItem -Category blog | Set-PSWorkItem -Category Other -PassThru
Database: C:\Users\Jeff\PSWorkItem.db
ID Name Description DueDate Category Pct
-- ---- ----------- ------- -------- ---
9 Clean database 8/2/2023 9:34:35 AM Other 0
5 revise blog pages essentials and tips 8/7/2023 5:00:00 PM Other 0
Modify multiple PSWorkItems at the same time.
PS C:\ Set-PSWorkItem -id 5 -ClearDescription
Clear the description property for the PSWorkItem with the ID of 5.
Specify an updated category. The category must be pre-defined. There should be tab-completion for this parameter. If you will be specifying an alternate database path, specify the path before using this parameter so that correct categories will be detected.
Type: String
Parameter Sets: set
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the command.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify an updated description. Do not include apostrophes.
Type: String
Parameter Sets: set
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify an updated due date.
Type: DateTime
Parameter Sets: set
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The work item ID. This is how you identify the PSWorkItem you want to update.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The updated name of the PSWorkItem. Do not include apostrophes.
Type: String
Parameter Sets: set
Aliases: task
Required: False
Position: Named
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
The path to the PSWorkItem SQLite database file. It should end in .db
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $PSWorkItemPath
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specify a percentage complete.
Type: Int32
Parameter Sets: set
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the command runs. The command is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Clear the description field. All other fields will remain untouched.
Type: SwitchParameter
Parameter Sets: clear
Aliases:
Required: False
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.
This command has an alias of swi.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/