I have a series of content types created in the content type gallery of the SharePoint admin center. I am trying to apply metadata in bulk using PowerShell to columns inherited from those content types.
When I attempt to use Set-PnPListItem
it tells me the column doesn't exist and may have been deleted by another user. Similar issues raised here and on other forums were solved by using the actual name (from the column URL) for the column instead of the display name. The URL shows this for the column name Effective%5Fx0020%5FDate
. That and the regular version "Effective Date" do not work.
I can set values of other columns which were not inherited from content types, but anything from a content type is not working for me.
I want to know if these types of columns need a workaround or a change to the standard syntax.
This Works:
Set-PnPListItem -List "Shared Documents" -Identity 237519 -ContentType "Contract" -Values @{"SortingIndex"= 8675309}
This doesn't:
Set-PnPListItem -List "Shared Documents" -Identity 237519 -ContentType "Contract" -Values @{"Effective Date"= [DateTime]"2020-7-16"}
Set-PnPListItem -List "Shared Documents" -Identity 237519 -ContentType "Contract" -Values @{"EffectiveDate"= [DateTime]"2020-7-16"}
Effective_x0020_Date
. Let me know if it works.