Link

New-TfsWorkItem

Creates a new work item.


Table of Contents

  1. Syntax
  2. Parameters
  3. Inputs
  4. Outputs
  5. Related Links

Syntax

New-TfsWorkItem
    [-Type] <object>
    [-AreaPath <string>]
    [-AssignedTo <object>]
    [-BoardColumn <string>]
    [-BoardColumnDone <bool>]
    [-BoardLane <string>]
    [-BypassRules]
    [-Collection <object>]
    [-Description <string>]
    [-Fields <Hashtable>]
    [-IterationPath <string>]
    [-Passthru]
    [-Priority <int>]
    [-Project <object>]
    [-Reason <string>]
    [-Server <object>]
    [-State <string>]
    [-Tags <string[]>]
    [-Team <object>]
    [-Title <string>]
    [-ValueArea <string>]

[Go to top]

Parameters

-AreaPath

Specifies the area path of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-AssignedTo

Specifies the user this work item is assigned to.

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-BoardColumn

Specifies the board column of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-BoardColumnDone

Specifies whether the work item is in the sub-column Doing or Done in a board.

Type bool
Position (Named)
Default Value False
Accept pipeline input False
Accept wildcard characters False

-BoardLane

Specifies the board lane of the work item

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-BypassRules

Bypasses any rule validation when saving the work item. Use it with caution, as this may leave the work item in an invalid state.

Type SwitchParameter
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Collection (Aliases: Organization)

Specifies the URL to the Team Project Collection or Azure DevOps Organization to connect to, a TfsTeamProjectCollection object (Windows PowerShell only), or a VssConnection object. You can also connect to an Azure DevOps Services organizations by simply providing its name instead of the full URL. For more details, see the Get-TfsTeamProjectCollection cmdlet. When omitted, it defaults to the connection set by Connect-TfsTeamProjectCollection (if any).

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Description

Specifies the description of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Fields

Specifies the names and the corresponding values for the fields to be set in the work item and whose values were not supplied in the other arguments to this cmdlet.

Type Hashtable
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-IterationPath

Specifies the iteration path of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Passthru

Returns the results of the command. By default, this cmdlet does not generate any output.

Type SwitchParameter
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Priority

Specifies the priority of the work item.

Type int
Position (Named)
Default Value 0
Accept pipeline input False
Accept wildcard characters False

-Project

Specifies the name of the Team Project, its ID (a GUID), or a Microsoft.TeamFoundation.Core.WebApi.TeamProject object to connect to. When omitted, it defaults to the connection set by Connect-TfsTeamProject (if any). For more details, see the Get-TfsTeamProject cmdlet.

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Reason

Specifies the reason (field ‘System.Reason’) of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Server

Specifies the URL to the Team Foundation Server to connect to, a TfsConfigurationServer object (Windows PowerShell only), or a VssConnection object. When omitted, it defaults to the connection set by Connect-TfsConfiguration (if any). For more details, see the Get-TfsConfigurationServer cmdlet.

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-State

Specifies the state of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Tags

Specifies the tags of the work item.

Type string[]
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Team

Specifies the name of the Team, its ID (a GUID), or a Microsoft.TeamFoundation.Core.WebApi.WebApiTeam object to connect to. When omitted, it defaults to the connection set by Connect-TfsTeam (if any). For more details, see the Get-TfsTeam cmdlet.

Type object
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Title

Specifies the title of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

-Type

Specifies the type of the new work item.

Type object
Position 0
Default Value (N/A)
Accept pipeline input True (byvalue)
Accept wildcard characters False

-ValueArea

Specifies the Value Area of the work item.

Type string
Position (Named)
Default Value (N/A)
Accept pipeline input False
Accept wildcard characters False

Inputs

System.Object

Specifies the type of the new work item.

Outputs

Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem