Forum Discussion
Jbrines1969
Jan 16, 2025Brass Contributor
Copy Column name and setting from one SharePoint List to another SharePoint List
Hi All, I have multiple SharePoint sites with the same List Name on them all, I have added several columns to one of the Lists and want to be able to copy the name and settings to all the other List...
michalkornet
Jan 19, 2025Iron Contributor
Hi Jbrines1969 , you can create a script in CLI for M365, PowerShell, or a flow in Power Automate to do so.
As you can see, in most cases, an XML schema of the source field is required.
CLI for M365:
https://pnp.github.io/cli-microsoft365/cmd/spo/field/field-add/ command with --xml parameter
PnP PowerShell :
https://pnp.github.io/powershell/cmdlets/Add-PnPFieldFromXml.html to use XML
or
https://pnp.github.io/powershell/cmdlets/Add-PnPField.html#example-6 with Formula parameter
SharePoint HTTP Request REST API in PowerAutomate: with SchemaXMl parameter
Jbrines1969
Jan 20, 2025Brass Contributor
Hi michalkornet what can I use to get "an XML schema of the source field is required". Sorry new to all of this but keen to learn.