Online Docs

Set-exTask

Updates an eTask item.

1
2
3
4
5
6
7
Set-exTasks
-Domain <String>
-TeamId <String>
-ChannelId <String>
-TaskId <String>
-Value @<Array>
[<CommonParameters>]

Parameters

  • Domain:
    • The domain where Team site is hosted, teams.company.com.
  • TeamId:
    • Required Team ID to be used by the cmdlet. See Common Parameters section in this document for more information.
  • ChannelId:
    • Channel ID to be used by the cmdlet. Retrieve the value for this parameter by right-click on the team site or channel and press “Get Link” command.
  • TaskId:
    • Task ID to be used by the cmdlet.
  • Cookie:
    • Optional cookie token to be used to authenticated into Team environment for eTask cmdlets.
  • FilterExp:
    • Optional filter expression to be used by the cmdlet. See Common Parameters section in this document for more information.

Outputs

Collection of task objects.

Error

TBS.

Examples

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Write-Host "" 
Write-Host "++++ Get-exTasks get one test task in <--your channel-->"
$myDomain = "teams.appvity.com"
$myTeam = "19:711c68b56d894b2697368214024dc89f@thread.skype"
$myChannel = "19:08c4a90b598840f0ad2055a9fe819aec@thread.skype"
$myTaskId = "5ea9d583a9712e71e869fa2c"

$myTasks = Get-exTasks -Domain $myDomain -TeamId $myTeam -ChannelId $myChannel -FilterExp "_id eq '$myTaskId'"
if ($myTasks) {
$myTasks | Format-List -Property name, source, status, priority, phasename, bucketname, dueDate, assignedTo, _id

Write-Host "++++ Set-exTask update this one task in <--your channel-->"
$myDate = $(Get-Date -Format u)
$myTaskName = "My Test Task - " + $myDate
$myAssignedTo = @()
$myUser = Get-exUser -UserPrincipalName "oliver@anadea.com" -SourceDirectory Microsoft.Graph.User
$myAssignedTo += $myUser
$myUser = Get-exUser -UserPrincipalName "kylachan@anadea.com" -SourceDirectory Microsoft.Graph.User
$myAssignedTo += $myUser

if ($myTasks[0].status -eq "Hold") {
$setValue = @{"Title" = $myTaskName; "status"="In Progress"; "priority"="Normal"; "phasename"="ePhase APR"; "bucketname"="eStory A";
"dueDate"= "$myDate"; "assignedTo" = $myAssignedTo}
}
else {
$setValue = @{"Title" = $myTaskName; "status"="Hold"; "priority"="Low"; "phasename"="ePhase MAY"; "bucketname"="eStory M1";
"dueDate"= "$myDate"; "assignedTo" = $myAssignedTo }
}
$setValue | Format-Table
$retStat = Set-exTask -Value $setValue -Domain $myDomain -TeamId $myTeam -ChannelId $myChannel -TaskId $myTaskId
}
Write-Host "++++ Re-read tasks for <--Your channel-->"
$myTasks = Get-exTasks -Domain $myDomain -TeamId $myTeam -ChannelId $myChannel -FilterExp "_id eq '$myTaskId'"
$myTasks | Format-List -Property name, source, status, priority, phasename, bucketname, dueDate, assignedTo, attachments, _id

Comment

Was this article helpful?
Thanks For Your Feedback