Search Results for

    Show / Hide Table of Contents

    Add-PnPPlannerTask

    SYNOPSIS

    Required Permissions

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

    Adds a new task to a planner bucket

    SYNTAX

    By Group

    Add-PnPPlannerTask -Group <PlannerGroupPipeBind> -Plan <PlannerPlanPipeBind> -Bucket <PlannerBucketPipeBind> -Title <String> 
    [-PercentComplete <Int32>] [-DueDateTime <DateTime>] [-StartDateTime <DateTime>] [-AppliedCategories <AppliedCategories>]
     [-AssignedTo <String[]] [-Priority <Int32>] [-Description <String>] [-OutputTask]
     
    

    By Plan Id

    Add-PnPPlannerTask -Bucket <PlannerBucketPipeBind> -PlanId <String> -Title <String> 
    [-PercentComplete <Int32>] [-DueDateTime <DateTime>] [-StartDateTime <DateTime>] [-AppliedCategories <AppliedCategories>]
     [-AssignedTo <String[]] [-Priority <Int32>] [-Description <String>] [-OutputTask]
     
    

    DESCRIPTION

    This cmdlet adds a new task to Planner bucket

    EXAMPLES

    Example 1

    Add-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan" -Bucket "Todos" -Title "Design booth layout" -AppliedCategories @{"Category1"=$true,"Category3"=$true}
    

    This cmdlet adds a new task.

    Example 2

    Add-PnPPlannerTask -PlanId "QvfkTd1mc02gwxHjHC_43JYABhAy" -Bucket "Todos" -Title "Design booth layout" -AppliedCategories @{"Category1"=$true,"Category3"=$true}
    

    This cmdlet adds a new task.

    Example 3

    Add-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan" -Bucket "Todos" -Title "Design booth layout" -AssignedTo "user@contoso.com","manager@contoso.com" -AppliedCategories @{"Category1"=$true,"Category3"=$true}
    

    This cmdlet adds a new task and assigns to user@contoso.com and manager@contoso.com

    Example 4

    $task = Add-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan" -Bucket "Todos" -Title "Design booth layout" -AssignedTo "user@contoso.com","manager@contoso.com" -OutputTask
    

    This returns the task as an object to inspect specific values

    PARAMETERS

    -Bucket

    The bucket to add the task too

    Type: PlannerBucketPipeBind
    Parameter Sets: (All)
    Aliases:
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Group

    Specify the group id or name of the 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 add the tasks to.

    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 the plan to add the tasks to.

    Type: String
    Parameter Sets: By Plan Id
    Aliases:
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Title

    Specify the title of the task

    Type: String
    Parameter Sets: (All)
    Aliases:
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -AppliedCategories

    The applied categories represent the labels as shown in the UI of the planner task. Categories are 'hardcoded' as such in Planner, e.g. you can set Category1 to Category25, each having its own color. Labels, if customized in planner will be set accordingly to the ones defined. You can either copy the value from an existing task (e.g. $task = Get-PnPPlannerTask, Add-PnPPlannerTask -PlanId -AppliedCategories $task.AppliedCategory) or you can define it as a new object: @{"Category1"=$true,"Category5"=$true}. Notice that omitting a category from the data you send in will -not- reset that category. E.g. if you want to remove a category/label from a task you will have to explicitly set it to $false.

    Type: AppliedCategories
    Parameter Sets: (All)
    Aliases: 
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -AssignedTo

    Specify the email(s) of the user to assign the task to.

    Type: String[]
    Parameter Sets: (All)
    Aliases:
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -StartDateTime

    Defines the start date of the task.

    Type: DateTime
    Parameter Sets: (All)
    Aliases:
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -DueDateTime

    Specify the due date.

    Type: DateTime
    Parameter Sets: (All)
    Aliases:
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -PercentComplete

    Defines the percentage of completeness of the task.

    Type: Int32
    Parameter Sets: (All)
    Aliases:
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Priority

    Sets the priority of the task. Value should be a number between 0 and 10.

    • values 0 and 1 are interpreted as Urgent
    • values 2, 3 and 4 are interpreted as Important
    • values 5, 6 and 7 are interpreted as Medium
    • values 8, 9 and 10 are interpreted as Low
    Type: Int32
    Parameter Sets: (All)
    Aliases:
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Description

    Sets the description (notes) of the task.

    Type: String
    Parameter Sets: (All)
    Aliases:
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -OutputTask

    Returns the just created task as an object to inspect values

    Type: SwitchParameter
    Parameter Sets: (All)
    
    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.

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer