< Back

Get-MyWorkItems

Sun Jan 19, 2020 6:08 pm

NAME Get-MyWorkItems



SYNOPSIS

Queries the work items connected to you





SYNTAX

Get-MyWorkItems [-AssignedToMe] [-CreatedByMe] [[-OrderBy] <String>] [[-Take] <Int32>] [-IncludeAllStates]

[[-IncludedStates] <String[]>] [[-Account] <String>] [[-Project] <String>] [<CommonParameters>]





DESCRIPTION

Get-MyWorkItems queries for the open work items that are created by or assigned

to you. By default it will include just items updated in the last 30 days and

filter out any work items that are in a "finished" state according to the

agile, scrum or cmmi templates.



Items are considered "finished" if State is any of the following values

Done

Removed

Resolved

Closed

Cut

Completed





PARAMETERS

-AssignedToMe [<SwitchParameter>]

Show work items that are assigned to the current user.

By default Get-MyWorkItems shows both work items created by you and assigned to you.

However, if you specify -AssignedToMe and don't specify -CreatedByMe then you

will only see items assigned to you



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-CreatedByMe [<SwitchParameter>]

Show work items that are created by the current user.

By default Get-MyWorkItems shows both work items created by you and assigned to you.

However, if you specify -CreatedByMe and don't specify -AssignedToMe then you

will only see items created by you



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-OrderBy <String>

The field to order by. By default this is System.ChangedDate



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Take <Int32>

The number of work items to show. Defaults to the 200. Max is 200.



Required? false

Position? 2

Default value 200

Accept pipeline input? false

Accept wildcard characters? false



-IncludeAllStates [<SwitchParameter>]

By default Get-MyWorkItems trys to filter out "finished" items. This property

prevents this behavior.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-IncludedStates <String[]>

By default Get-MyWorkItems trys to filter out "finished" items. This property

prevents this behavior and lets you specify just the states you want.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Account <String>

The acount name to use. Can be inherited from a config file.

If your AzureDevOps url is hello.visualstudio.com then this value should be hello.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Project <String>

The project name to use. Can be inherited from a config file.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-MyWorkItems



Gets work items assigned to current user









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-WorkItems -Take 10 -OrderBy System.AssignedTo



Gets the first 10 work items assigned to or created by the current user ordered by assignedto name











RELATED LINKS

about_PsAzureDevOps