2

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.

1
  • ### 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 }} Commented Nov 17, 2017 at 20:31

1 Answer 1

0

Got it.

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

}}
1
  • You can accept your own answer. It'll prevent it from automatic bumping to homepage. Commented Jun 12, 2019 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.