Set-PSWorkItemCategory
February 11, 2026 ยท View on GitHub
SYNOPSIS
Update an existing PSWorkItem category
SYNTAX
Set-PSWorkItemCategory [-Category] <String> [-Description <String>]
[-NewName <String>] [-Path <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
This command will update an existing PSWorkItem category. The category name is case-sensitive. Use caution when renaming a category that has active tasks using the old category name.
If you want to modify the associated ANSI color, you will need to add or modify an entry in the $PSWorkItemCategory hashtable.
$PSWorkItemCategory.Add("Event","`e[38;5;225m")
EXAMPLES
Example 1
PS C:\> Set-PsworkItemCategory -Category work -Description "Uncategorized work activities" -PassThru
Category Description
-------- -----------
Work Uncategorized work activities
PARAMETERS
-Category
Specify a case-sensitive category name. 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: (All)
Aliases: Name
Required: True
Position: 0sq
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description
Specify a category comment or description.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NewName
Specify a new name for the category. This is case-sensitive. Be careful renaming a category with active tasks using the old category name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PassThru
Write the updated category to the pipeline.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
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: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet 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
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
System.String
OUTPUTS
None
PSWorkItemCategory
NOTES
Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter