Table of Contents

Get-PnPPlannerTask

SYNOPSIS

Required Permissions

  • Microsoft Graph API: One of Tasks.Read, Tasks.ReadWrite, Tasks.Read.All, Tasks.ReadWrite.All, Group.Read.All, Group.ReadWrite.All

Returns Planner tasks

SYNTAX

By Group

Get-PnPPlannerTask -Group <PlannerGroupPipeBind> -Plan <PlannerPlanPipeBind> [-ResolveUserDisplayNames]
  

By Bucket

Get-PnPPlannerTask -Bucket <PlannerBucketPipeBind> [-ResolveUserDisplayNames] 
 

By Plan Id

Get-PnPPlannerTask -PlanId <String> [-ResolveUserDisplayNames]  

By Task Id

Get-PnPPlannerTask -TaskId <String> [-ResolveUserDisplayNames]  

DESCRIPTION

This cmdlet returns Planner tasks.

EXAMPLES

Example 1

Get-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan"

This returns all tasks for the specific plan.

Example 2

$tasks = Get-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan" -ResolveUserDiplayNames
$task = $tasks | Select-Object -First 1
$task.CreatedBy.DisplayName 

This retrieves all tasks for a specific plan, takes the first task and prints the display name of the user that created the task.

Example 3

Get-PnPPlannerTask -PlanId "QvfkTd1mc02gwxHjHC_43JYABhAy"

This returns all tasks for the specified plan.

Example 4

Get-PnPPlannerTask -TaskId "QvfkTd1mc02gwxHjHC_43JYABhAy"

This returns a specific task.

PARAMETERS

-Bucket

Specify the bucket or bucket id to retrieve the tasks for.

Type: PlannerBucketPipeBind
Parameter Sets: By Bucket
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Group

Specify the group id or name of group owning the plan.

Type: PlannerGroupPipeBind
Parameter Sets: By Group
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Plan

Specify the id or name of the plan to retrieve the tasks for.

Type: PlannerPlanPipeBind
Parameter Sets: By Group
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PlanId

Specify the id of the plan to retrieve the tasks for.

Type: String
Parameter Sets: By Plan Id
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TaskId

Specify the id of the task to retrieve.

Type: String
Parameter Sets: By Task Id
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResolveUserDisplayNames

Will resolve user id's to usernames

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeDetails

Includes checklist and description details

Type: SwitchParameter
Parameter Sets: By Task Id
Aliases:

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.

Microsoft 365 Patterns and Practices