Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # get the content type from the library
- $ct = Get-PnPContentType -Identity "Folder" -List "Documents"
- # get the fieldlinks collection from the content type
- $fieldLinks = $ct.FieldLinks
- (Get-PnPContext).Load($fieldLinks)
- Invoke-PnPQuery
- # get the title field from the site columns
- $titleField = Get-PnPField -Identity "Title"
- $fieldLinks.GetById($titleField.Id)
- # load the fieldlink for the title field
- $fieldLink = $fieldLinks.GetById($titleField.Id)
- (Get-PnPContext).Load($fieldLink)
- Invoke-PnPQuery
- # make the title field visible
- $fieldLink.Hidden = $false
- $ct.Update($false)
- Invoke-PnPQuery
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement