How to add multiple values in peoplepicker field useing powershell

IT SUPPORT 1 Reputation point

Hi, I have some issues trying to make a script that takes multiple users from AD group and adds them to a sharepoint 2019 lists Person and group collon, at the end I only get one entry in the sharepoint list (the first user that the AD group has) my script:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

Configuration Variables


Get site and List objects

$web = Get-SPWeb https://sitename
$list= $web.GetList("https://sitename/list")

Get the List Item to update

$ListItem = $List.GetItemByID(644)

User Account to set

$UserAccounts=Get-ADGroupMember -Identity "ADgroupname"

$UserCollection = new-object Microsoft.SharePoint.SPFieldUserValueCollection
foreach($UserAccount in $UserAccounts)
#Get the User

#Add to collection
$UserFieldValue = new-object Microsoft.SharePoint.SPFieldUserValue($Web, $User.ID, $User.LoginName)


update the Multiple value Person or Group field

$ListItem[$FieldName] = $UserCollection

Any help would be appreciated

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,432 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,889 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael 17,921 Reputation points

    Hi @IT SUPPORT ,

    You need to configure the variable $UserCollection as the below:

    [Microsoft.SharePoint.SPFieldUserValueCollection]$UserCollection = new-object Microsoft.SharePoint.SPFieldUserValueCollection  

    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.

    0 comments No comments