pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
987 stars 665 forks source link

Add-PnPContentTypeToDocumentSet does not work #1654

Open gurdeepsira opened 6 years ago

gurdeepsira commented 6 years ago

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting

Expected behavior

Add-PnPContentTypeToDocumentSet -ContentType $ParentCT -DocumentSet $docSet

Where docset is the returned object from add-pnpdocumentset (get-pnpdocumentsettemplate gives an error).

This should append content type to document set.

Actual behavior

Instead, I get this error:

Add-PnPContentTypeToDocumentSet : Unknown Error

Not clear why

Steps to reproduce behavior

Run the cmdlet

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

2.28.18

How did you install the PnP-PowerShell Cmdlets?

Jlopean commented 6 years ago

have a look at this. there is an issue when using document sets with "modern" sharepoint websites. It may help (not sure)

*Basically you need to enable scripts on a website before using document sets https://github.com/SharePoint/PnP-Sites-Core/issues/1707

holylander commented 4 years ago

Take a look to the code I posted here so you can find out how to enable the docset along the site script with pnp-powershell