Hi @Addison Jiang ,
Judging from the screenshots and scenarios you provided, the cause of the problem is:
- When there are multiple columns with the same GUID in list().
This could be due to manually specifying the GUID when creating the column, or a problem while migrating the column. In this case, you won't be able to uniquely identify the field using the GUID, and you may have problems deleting the field.
Please try this method to remove duplicate columns:
$HashFields = $web.Fields | Where {$_.Title -like 'HashTags_0'}
foreach($F in $HashFields)
{
$F.Title
if(!$F.Sealed){$F.delete()}
}
$web.Update()
$web.Dispose()
Here is a link about how to delete duplicate fields for your reference:
sharepoint server - Error exporting the site field named "HashTags_0"." - SharePoint Stack Exchange
I hope this helps you solve your problem!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.
Best Regards
Cheng Feng