Forum Discussion
kevingeorget
Feb 05, 2019Brass Contributor
Adding user to a Multivalued person field SPO Powershell
Hi SharePoint Users, I'm trying to add multiple users to a person field using the code below. I get the error - Cannot find type [Microsoft.SharePoint.SPFieldUserValueCollection]: verify that the a...
Feb 05, 2019
How are you loading SPO assemblies in your script?
- kevingeorgetFeb 05, 2019Brass Contributor
with the below code. The folder has the 3 Dll's
$dllDir="D:\SharePointDll"
try{
Add-Type -Path ("$dllDir\Microsoft.SharePoint.Client.dll") | Out-Null
Add-Type -Path ("$dllDir\Microsoft.SharePoint.Client.Runtime.dll") | Out-Null
Add-Type -Path ("$dllDir\Microsoft.SharePoint.Client.Publishing.dll")|Out-Null
}
catch{
Log "Error: $($_.Exception.Message) $((get-date -format G))"
}