Using PowerShell and CSOM, I'm able to upload to the Drop Off Library but the document never routes. Working with SP2016 on-prem.
- Manually uploaded documents route correctly.
- CSOM uploaded documents will route only after I edit the properties and click save (no changes are made to the metadata).
- My account is in the Records Center Web Service Submitters group along with Site Owners.
Example of the script I'm working with:
$FileStream = New-Object IO.FileStream($File.FullName,[System.IO.FileMode]::Open)
$FileCreationInfo = New-Object Microsoft.SharePoint.Client.FileCreationInformation
$FileCreationInfo.Overwrite = $true
$FileCreationInfo.ContentStream = $FileStream
$FileCreationInfo.URL = $File
$Upload = $List.RootFolder.Files.Add($FileCreationInfo)
$item = $Upload.ListItemAllFields
$item["Router"] = "B"
$item.Update()
$RemoteContext.Load($Upload)
$RemoteContext.Load($item)
$RemoteContext.ExecuteQuery()