I have a list in SharePoint with 50 content types. My list has two columns that I want to add to each content type in my list using PNP library. Until now I have something like this:
Add-PnPField -List $listTitle -Field $_.Name
But I could't find a way to check that "Add to all content types" checkbox from PNP. I've tried
-AddToAllContentTypes
but i've got this error: Add-PnPField : A positional parameter cannot be found that accepts argument 'AddFieldOptions.AddToNoContentType'.
Any way to do that ?