Since $allTask is an array, you can use the index notation to address the 2nd one.
Like this
Get-Task | where {$_.Id -match $allTask[1].Id}
Since $allTask is an array, you can use the index notation to address the 2nd one.
Like this
Get-Task | where {$_.Id -match $allTask[1].Id}