Forum Discussion
Create Content Types programmatically or import massively
- Sep 28, 2020
andres101 This works well with SharePoint Online! 🙂 Could you please mark my previous post as best answer if it was what you were looking for?
Here is the link:
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpcontenttype?view=sharepoint-psIf you need any more assistance, please notify me.
andres101 Try creating content types with PowerShell,
Add-PnPContentType -Name "<name> " -Description "<description>" -Group "<group name>" -ParentContentType <parent content type (to fetch default columns)>
Then you can add fields to that specific content type:
Add-PnPField -DisplayName "<display name>" -InternalName "<internal name>" -Type <field type> -Group "<same group as the content type>"
Hey! Thanks for your response.
Could you provide be with a link to the powershell documentation related to this? My background is Web Development and I have no experience with Microsoft PowerShell.
Also, note that it should be able to work with SharePoint Onlilne
- Sep 28, 2020
andres101 This works well with SharePoint Online! 🙂 Could you please mark my previous post as best answer if it was what you were looking for?
Here is the link:
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpcontenttype?view=sharepoint-psIf you need any more assistance, please notify me.
- andres101Oct 13, 2020Copper ContributorI've been looking into the docs and haven't been able to test it yet, but it looks promising!