I am trying to fetch List details along with associated task columns to export into Excel using PowerShell. I am able to get all columns using following script except Assigned To column to show with which user the task is pending with from associated task list.

foreach ($item in $list.Items |  Where-Object { $_["Approval"] -eq "15"})
   foreach($workflow in $item.workflows)`
      if($item.ID -eq $workflow.ItemId)
         $wfName = $wf.Name
         $wfItem = $workflow.ItemName
         $wfPendingWith = $workflow.AssignedTo
         write-host "Title: $wfName  ListItem: $wfItem PendingWith:$wfPendingWith"

Can you please point out what am I missing here? Thanks.

1 Answer 1


I´m looking to do something similar and came across your question. I think you should drill down into the AssignedTo object, which is a user. Something like "$workflow.AssignedTo.UserName"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.