Add-PSWorkItemCategory
February 11, 2026 ยท View on GitHub
SYNOPSIS
Add a new PSWorkItem category
SYNTAX
Add-PSWorkItemCategory [-Category] <String[]> [[-Description] <String>]
[-Path <String>] [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
When you set up a new PSWorkItem database, it will define the default categories of Personal, Work, Project, and Other. You may want to add categories. The category must be defined before you can use it. The category will not be added if it already exists unless you use -Force.
It is recommended that you use proper casing for your category names and that they be single words.
EXAMPLES
Example 1
PS C:\> Add-PSWorkItemCategory -Name Blog -Description "blog management and content" -PassThru
Category Description
-------- -----------
Blog blog management and content
PARAMETERS
-Category
Specify the category name.
Type: String[]
Parameter Sets: (All)
Aliases: Name
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Confirm
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
-Description
Specify a category comment or description.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Force
Force overwriting an existing category.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PassThru
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 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
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[]
System.String
OUTPUTS
None
PSWorkItemCategory
NOTES
Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter