Trying to update a column for a number of folders in SharePoint online. I have a CSV with the Item ID and the update for the column. Here is the code:
#Config Variables
$SiteURL = "https://xxxxxxxxxxx.sharepoint.com/teams/TestSite"
$DestinationFolderIds = Import-Csv -Path "C:TempFile2.csv"
#Connect to PnP Online
Import-Module PnP.PowerShell
Connect-ExchangeOnline
Connect-PnPOnline -Url $SiteUrl -Interactive
#Update Folders
ForEach($DestinationFolderID in $DestinationFolderIds)
{
$folderid = Get-PnPListItem -List "Documents" -Id $DestinationFolderID.folderid
Set-PnPListItem -list Documents -identity $folderid -values @{"RDO" = "$DestinationFolderID.rdo"} | Out-Null
}
Getting this error:
Cannot bind parameter 'Id' to the target. Exception setting "Id": "Cannot convert null to type "System.Int32"."