Hi @Tom Molskow , thank you for posting in the Q&A forum.
In line 56 ~line 59, just change your code to the below to make it limited to fields in the list view :
Foreach($Field in $view.ViewFields | Where {!$_.hidden})
{
$ExportItem | Add-Member -MemberType NoteProperty -name $Field -value $_[$Field]
}
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.