1

I use the PnP Commandlets to do much of my site building but cannot figure out how to make Site Content Types not read-only. There is no way to do this with commandlets so I'm looking for some help.

I'd assume it was something along the line of:

$contentType = "Document Type"
$creds = Get-Credential
$url = [MY URL]
Connect-PnpOnline -Identity $url -Credentials $creds
$theContentType = Get-PnpContentType -Identity $contentType

This is where I get lost. Any help would be appreciated.

  • ### Make Content Types Not Read Only $ctlist = Get-PnpContentType foreach ($ctype in $ctList) { if ($ctype.Group -like "HM*") { $ct = Get-PnpContentType $ctype $ct.ReadOnly = $false $ct.Update($true) Execute-PnpQuery }} – Joe Fedorowicz Nov 17 '17 at 20:31
0

Got it.

### Make Content Types Not Read Only
$ct = Get-PnpContentType $ctype
$ct.ReadOnly = $false
$ct.Update($true)
Execute-PnpQuery

}}
|improve this answer|||||
  • You can accept your own answer. It'll prevent it from automatic bumping to homepage. – Slaven Semper Jun 12 '19 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.