Open sparkitect opened 4 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
I opened a pull request to PnP-Sites-Core and another to PnP-PowerShell to implement -AddToAllContentTypes
The PR has been merged and now you can use -AddToAllContentTypes parameter with Add-PnPField
Reporting an Issue or Missing Feature
When adding a column to a List or Library using the browser, one has an option to add the column to all of the Content Types in the List or Library. When adding a column to a List or Library using PnP PowerShell, this option is missing.
Expected behavior
If a parameter (e.g. -AddToAllContentTypes) specifies that the column should be added to all List Content Types, then the column should indeed be added to all List Content Types.
Actual behavior
No such parameter exists and the column is only added to the List's Default Content Type.
Steps to reproduce behavior
Add-PnPField -List $list -DisplayName $columnName -InternalName $columnInternalName -AddToDefaultView -Type $columnType | Out-Null
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
3.18.2002.0
How did you install the PnP-PowerShell Cmdlets?