Forum Discussion
wit4r7
Sep 22, 2020Brass Contributor
Fill PeoplePicker Field via PnP PowerShell
Hey everybody, I have an Excel-List which contains a column which includes email addresses which I want to upload to a SharePoint List with PnP "Add-PnPListItem". The addresses are comma-separa...
- Sep 24, 2020
I just want to answer my own question.
After getting it into the correct format (the array) I messed up with quotation marks.
The following worked for me.
$Members = $WorkSheet.Range("G$i").Value2.Split(';').Trim() $Members.Replace('"', '') Add-PnPListItem -List $listName -Values @{"Members" = $Members}
wit4r7
Sep 24, 2020Brass Contributor
I just want to answer my own question.
After getting it into the correct format (the array) I messed up with quotation marks.
The following worked for me.
$Members = $WorkSheet.Range("G$i").Value2.Split(';').Trim()
$Members.Replace('"', '')
Add-PnPListItem -List $listName -Values @{"Members" = $Members}