New-MgPlannerTask
Create a new plannerTask.
Note
To view the beta release of this cmdlet, view New-MgBetaPlannerTask
Syntax
New-MgPlannerTask
[-ResponseHeadersVariable <String>]
[-ActiveChecklistItemCount <Int32>]
[-AdditionalProperties <Hashtable>]
[-AppliedCategories <Hashtable>]
[-AssignedToTaskBoardFormat <IMicrosoftGraphPlannerAssignedToTaskBoardTaskFormat>]
[-AssigneePriority <String>]
[-Assignments <Hashtable>]
[-BucketId <String>]
[-BucketTaskBoardFormat <IMicrosoftGraphPlannerBucketTaskBoardTaskFormat>]
[-ChecklistItemCount <Int32>]
[-CompletedBy <IMicrosoftGraphIdentitySet>]
[-CompletedDateTime <DateTime>]
[-ConversationThreadId <String>]
[-CreatedBy <IMicrosoftGraphIdentitySet>]
[-CreatedDateTime <DateTime>]
[-Details <IMicrosoftGraphPlannerTaskDetails>]
[-DueDateTime <DateTime>]
[-HasDescription]
[-Id <String>]
[-OrderHint <String>]
[-PercentComplete <Int32>]
[-PlanId <String>]
[-PreviewType <String>]
[-Priority <Int32>]
[-ProgressTaskBoardFormat <IMicrosoftGraphPlannerProgressTaskBoardTaskFormat>]
[-ReferenceCount <Int32>]
[-StartDateTime <DateTime>]
[-Title <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-MgPlannerTask
-BodyParameter <IMicrosoftGraphPlannerTask>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create a new plannerTask.
Permissions
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Tasks.ReadWrite | Group.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Tasks.ReadWrite.All | Not available. |
Examples
Example 1: Code snippet
Import-Module Microsoft.Graph.Planner
$params = @{
planId = "xqQg5FS2LkCp935s-FIFm2QAFkHM"
bucketId = "hsOf2dhOJkqyYYZEtdzDe2QAIUCR"
title = "Update client list"
assignments = @{
"fbab97d0-4932-4511-b675-204639209557" = @{
"@odata.type" = "#microsoft.graph.plannerAssignment"
orderHint = " !"
}
}
}
New-MgPlannerTask -BodyParameter $params
This example shows how to use the New-MgPlannerTask Cmdlet.
Parameters
-ActiveChecklistItemCount
Number of checklist items with value set to false, representing incomplete items.
Type: | Int32 |
Position: | Named |
Default value: | 0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AdditionalProperties
Additional Parameters
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AppliedCategories
plannerAppliedCategories
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AssignedToTaskBoardFormat
plannerAssignedToTaskBoardTaskFormat To construct, see NOTES section for ASSIGNEDTOTASKBOARDFORMAT properties and create a hash table.
Type: | IMicrosoftGraphPlannerAssignedToTaskBoardTaskFormat |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AssigneePriority
Hint used to order items of this type in a list view. The format is defined as outlined here.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Assignments
plannerAssignments
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BodyParameter
plannerTask To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Type: | IMicrosoftGraphPlannerTask |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BucketId
Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It's 28 characters long and case-sensitive. Format validation is done on the service.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BucketTaskBoardFormat
plannerBucketTaskBoardTaskFormat To construct, see NOTES section for BUCKETTASKBOARDFORMAT properties and create a hash table.
Type: | IMicrosoftGraphPlannerBucketTaskBoardTaskFormat |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ChecklistItemCount
Number of checklist items that are present on the task.
Type: | Int32 |
Position: | Named |
Default value: | 0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CompletedBy
identitySet To construct, see NOTES section for COMPLETEDBY properties and create a hash table.
Type: | IMicrosoftGraphIdentitySet |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CompletedDateTime
Read-only. Date and time at which the 'percentComplete' of the task is set to '100'. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ConversationThreadId
Thread ID of the conversation on the task. This is the ID of the conversation thread object created in the group.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CreatedBy
identitySet To construct, see NOTES section for CREATEDBY properties and create a hash table.
Type: | IMicrosoftGraphIdentitySet |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CreatedDateTime
Read-only. Date and time at which the task is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Details
plannerTaskDetails To construct, see NOTES section for DETAILS properties and create a hash table.
Type: | IMicrosoftGraphPlannerTaskDetails |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DueDateTime
Date and time at which the task is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HasDescription
Read-only. Value is true if the details object of the task has a nonempty description and false otherwise.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Headers
Optional headers that will be added to the request.
Type: | IDictionary |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Id
The unique identifier for an entity. Read-only.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OrderHint
Hint used to order items of this type in a list view. The format is defined as outlined here.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PercentComplete
Percentage of task completion. When set to 100, the task is considered completed.
Type: | Int32 |
Position: | Named |
Default value: | 0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PlanId
Plan ID to which the task belongs.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PreviewType
plannerPreviewType
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Priority
Priority of the task. The valid range of values is between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as 'urgent', 2, 3 and 4 as 'important', 5, 6, and 7 as 'medium', and 8, 9, and 10 as 'low'. Additionally, Planner sets the value 1 for 'urgent', 3 for 'important', 5 for 'medium', and 9 for 'low'.
Type: | Int32 |
Position: | Named |
Default value: | 0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProgressAction
{{ Fill ProgressAction Description }}
Type: | ActionPreference |
Aliases: | proga |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProgressTaskBoardFormat
plannerProgressTaskBoardTaskFormat To construct, see NOTES section for PROGRESSTASKBOARDFORMAT properties and create a hash table.
Type: | IMicrosoftGraphPlannerProgressTaskBoardTaskFormat |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReferenceCount
Number of external references that exist on the task.
Type: | Int32 |
Position: | Named |
Default value: | 0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResponseHeadersVariable
Optional Response Headers Variable.
Type: | String |
Aliases: | RHV |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StartDateTime
Date and time at which the task starts. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Title
Title of the task.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerTask
System.Collections.IDictionary
Outputs
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerTask
Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
ASSIGNEDTOTASKBOARDFORMAT <IMicrosoftGraphPlannerAssignedToTaskBoardTaskFormat>
: plannerAssignedToTaskBoardTaskFormat
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[OrderHintsByAssignee <IMicrosoftGraphPlannerOrderHintsByAssignee>]
: plannerOrderHintsByAssignee[(Any) <Object>]
: This indicates any property can be added to this object.
[UnassignedOrderHint <String>]
: Hint value used to order the task on the AssignedTo view of the Task Board when the task isn't assigned to anyone, or if the orderHintsByAssignee dictionary doesn't provide an order hint for the user the task is assigned to. The format is defined as outlined here.
BODYPARAMETER <IMicrosoftGraphPlannerTask>
: plannerTask
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[ActiveChecklistItemCount <Int32?>]
: Number of checklist items with value set to false, representing incomplete items.[AppliedCategories <IMicrosoftGraphPlannerAppliedCategories>]
: plannerAppliedCategories[(Any) <Object>]
: This indicates any property can be added to this object.
[AssignedToTaskBoardFormat <IMicrosoftGraphPlannerAssignedToTaskBoardTaskFormat>]
: plannerAssignedToTaskBoardTaskFormat[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[OrderHintsByAssignee <IMicrosoftGraphPlannerOrderHintsByAssignee>]
: plannerOrderHintsByAssignee[(Any) <Object>]
: This indicates any property can be added to this object.
[UnassignedOrderHint <String>]
: Hint value used to order the task on the AssignedTo view of the Task Board when the task isn't assigned to anyone, or if the orderHintsByAssignee dictionary doesn't provide an order hint for the user the task is assigned to. The format is defined as outlined here.
[AssigneePriority <String>]
: Hint used to order items of this type in a list view. The format is defined as outlined here.[Assignments <IMicrosoftGraphPlannerAssignments>]
: plannerAssignments[(Any) <Object>]
: This indicates any property can be added to this object.
[BucketId <String>]
: Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It's 28 characters long and case-sensitive. Format validation is done on the service.[BucketTaskBoardFormat <IMicrosoftGraphPlannerBucketTaskBoardTaskFormat>]
: plannerBucketTaskBoardTaskFormat[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[OrderHint <String>]
: Hint used to order tasks in the bucket view of the task board. For details about the supported format, see Using order hints in Planner.
[ChecklistItemCount <Int32?>]
: Number of checklist items that are present on the task.[CompletedBy <IMicrosoftGraphIdentitySet>]
: identitySet[(Any) <Object>]
: This indicates any property can be added to this object.[Application <IMicrosoftGraphIdentity>]
: identity[(Any) <Object>]
: This indicates any property can be added to this object.[DisplayName <String>]
: The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.[Id <String>]
: Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
[Device <IMicrosoftGraphIdentity>]
: identity[User <IMicrosoftGraphIdentity>]
: identity
[CompletedDateTime <DateTime?>]
: Read-only. Date and time at which the 'percentComplete' of the task is set to '100'. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z[ConversationThreadId <String>]
: Thread ID of the conversation on the task. This is the ID of the conversation thread object created in the group.[CreatedBy <IMicrosoftGraphIdentitySet>]
: identitySet[CreatedDateTime <DateTime?>]
: Read-only. Date and time at which the task is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z[Details <IMicrosoftGraphPlannerTaskDetails>]
: plannerTaskDetails[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[Checklist <IMicrosoftGraphPlannerChecklistItems>]
: plannerChecklistItems[(Any) <Object>]
: This indicates any property can be added to this object.
[Description <String>]
: Description of the task.[PreviewType <String>]
: plannerPreviewType[References <IMicrosoftGraphPlannerExternalReferences>]
: plannerExternalReferences[(Any) <Object>]
: This indicates any property can be added to this object.
[DueDateTime <DateTime?>]
: Date and time at which the task is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z[HasDescription <Boolean?>]
: Read-only. Value is true if the details object of the task has a nonempty description and false otherwise.[OrderHint <String>]
: Hint used to order items of this type in a list view. The format is defined as outlined here.[PercentComplete <Int32?>]
: Percentage of task completion. When set to 100, the task is considered completed.[PlanId <String>]
: Plan ID to which the task belongs.[PreviewType <String>]
: plannerPreviewType[Priority <Int32?>]
: Priority of the task. The valid range of values is between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as 'urgent', 2, 3 and 4 as 'important', 5, 6, and 7 as 'medium', and 8, 9, and 10 as 'low'. Additionally, Planner sets the value 1 for 'urgent', 3 for 'important', 5 for 'medium', and 9 for 'low'.[ProgressTaskBoardFormat <IMicrosoftGraphPlannerProgressTaskBoardTaskFormat>]
: plannerProgressTaskBoardTaskFormat[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[OrderHint <String>]
: Hint value used to order the task on the progress view of the task board. For details about the supported format, see Using order hints in Planner.
[ReferenceCount <Int32?>]
: Number of external references that exist on the task.[StartDateTime <DateTime?>]
: Date and time at which the task starts. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z[Title <String>]
: Title of the task.
BUCKETTASKBOARDFORMAT <IMicrosoftGraphPlannerBucketTaskBoardTaskFormat>
: plannerBucketTaskBoardTaskFormat
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[OrderHint <String>]
: Hint used to order tasks in the bucket view of the task board. For details about the supported format, see Using order hints in Planner.
COMPLETEDBY <IMicrosoftGraphIdentitySet>
: identitySet
[(Any) <Object>]
: This indicates any property can be added to this object.[Application <IMicrosoftGraphIdentity>]
: identity[(Any) <Object>]
: This indicates any property can be added to this object.[DisplayName <String>]
: The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.[Id <String>]
: Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
[Device <IMicrosoftGraphIdentity>]
: identity[User <IMicrosoftGraphIdentity>]
: identity
CREATEDBY <IMicrosoftGraphIdentitySet>
: identitySet
[(Any) <Object>]
: This indicates any property can be added to this object.[Application <IMicrosoftGraphIdentity>]
: identity[(Any) <Object>]
: This indicates any property can be added to this object.[DisplayName <String>]
: The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.[Id <String>]
: Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
[Device <IMicrosoftGraphIdentity>]
: identity[User <IMicrosoftGraphIdentity>]
: identity
DETAILS <IMicrosoftGraphPlannerTaskDetails>
: plannerTaskDetails
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[Checklist <IMicrosoftGraphPlannerChecklistItems>]
: plannerChecklistItems[(Any) <Object>]
: This indicates any property can be added to this object.
[Description <String>]
: Description of the task.[PreviewType <String>]
: plannerPreviewType[References <IMicrosoftGraphPlannerExternalReferences>]
: plannerExternalReferences[(Any) <Object>]
: This indicates any property can be added to this object.
PROGRESSTASKBOARDFORMAT <IMicrosoftGraphPlannerProgressTaskBoardTaskFormat>
: plannerProgressTaskBoardTaskFormat
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[OrderHint <String>]
: Hint value used to order the task on the progress view of the task board. For details about the supported format, see Using order hints in Planner.
RELATED LINKS
https://learn.microsoft.com/powershell/module/microsoft.graph.planner/new-mgplannertask
https://learn.microsoft.com/graph/api/planner-post-tasks?view=graph-rest-1.0