external help file | Module Name | online version | schema |
---|---|---|---|
PSWorkItem-help.xml |
PSWorkItem |
2.0.0 |
Create a new PSWorkItem.
New-PSWorkItem [-Name] <String> [[-Description] <String>] [-DueDate <DateTime>] [-Path <String>] [-PassThru] [-WhatIf] [-Confirm] [[-Category] <String>] [<CommonParameters>]
New-PSWorkItem [-Name] <String> [[-Description] <String>] [-DaysDue <Int32>] [-Path <String>] [-PassThru] [-WhatIf] [-Confirm] [[-Category] <String>] [<CommonParameters>]
Use this command to add a new PSWorkItem to the database. It is assumed you have already defined your task categories. The default is to create a new PSWorkItem with a due date 30 days from now. You can specify any due date or the number of days from now.
PS C:\> New-PSWorkItem -Name "Blog updates" -Description "update pages" -DueDate "8/15/2023 5:00PM" -Category Blog -PassThru
Create a new PSWorkItem with a due date 30 days from now. You should be able to use tab completion for the Category parameter.
PS C:\> New-PSWorkItem -Name "Publish PSWorkItem" -DaysDue 3 -Category Project
Create a new PSWorkItem due in 3 days.
Select a valid 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.
If you would like to set a default category you can manually add an entry to $PSDefaultParameterValues. Or use Update-PSWorkItemPreference with a default category and re-import the module into your PowerShell session.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
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
Add a comment or task description. Do not include apostrophes.
Type: String
Parameter Sets: (All)
Aliases: comment
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
When is this task due? The default is the value of adding the number of days in $PSWorkItemDefaultDays to the current date. The module default is 30 days.
Type: DateTime
Parameter Sets: date
Aliases: Date
Required: False
Position: Named
Default value: $PSWorkItemDefaultDays from now
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The name of the work item. Do not include apostrophes.
Type: String
Parameter Sets: (All)
Aliases: task
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
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: 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
Specify the number of days before the task is due to be completed. Enter a value between 1 and 365.
Type: Int32
Parameter Sets: days
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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 nwi.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/