message: Fixes sample script referencing deprecated task details get. Closes
diff: @@ -24,20 +24,21 @@ Use the CLI for Microsoft 365 to migrate an existing plan to a SharePoint Online
  $m365Status = m365 status
  - if ($m365Status -eq "Logged Out") {
  + if ($m365Status -match "Logged Out") {
  # Connection to Microsoft 365
  m365 login
  }
  - $migrationTasks = @()
  - $plan = m365 planner plan list --ownerGroupName $PlanGroupName | ConvertFrom-Json
  + $plans = m365 planner plan list --ownerGroupName $PlanGroupName | ConvertFrom-Json
  + Write-Host "Found $($plans.length) plans to migrate"
  - if ($null -ne $plan) {
  + foreach ($plan in $plans) {
  + $migrationTasks = @()
  $plannerBuckets = m365 planner bucket list --planId $plan.id | ConvertFrom-Json
  $plannerTasks = m365 planner task list --planId $plan.id | ConvertFrom-Json
  foreach ($task in $plannerTasks) {
  - $taskDetails = m365 planner task details get --taskId $task.id --query '{description: description, checklist: checklist.*.{isChecked: isChecked, title: title} }' | ConvertFrom-Json
  + $taskDetails = m365 planner task get --id $task.id --query '{description: description, checklist: checklist.*.{isChecked: isChecked, title: title} }' | ConvertFrom-Json
  $assignedUsers = @()
  foreach ($userId in $($task.assignments | ForEach-Object { $($_).PSObject.Properties.Name })) {
  @@ -68,8 +69,9 @@ Use the CLI for Microsoft 365 to migrate an existing plan to a SharePoint Online
  }
  }
  - Write-Host "Found $($plannerBuckets.length) buckets and $($plannerTasks.length) tasks to migrate"
  + Write-Host "`nFound $($plannerBuckets.length) buckets and $($plannerTasks.length) tasks to migrate for the plan $($plan.title)"
  + if ($plannerTasks.length -gt 0) {
  if ($false -eq $SkipListCreation) {
  if ($ShowProgress) {
  Write-Host "Setting up List"
  @@ -116,6 +118,11 @@ Use the CLI for Microsoft 365 to migrate an existing plan to a SharePoint Online
  $updatedItem = m365 spo listitem set --webUrl $SiteUrl --listTitle $plan.title --id $newItem.Id --Checklist $migrationTask.Checklist
  }
  }
  +
  + Write-Host "Migrating finished for the plan $($plan.title)"
  + } else {
  + Write-Host "Skipping migrating due to lack of tasks"
  + }
  }
  ```
  