Open jaskirat-randhawa opened 5 years ago
This is working in a more recent version of PnP PowerShell (3.9.1905.3). Please update cmdlets.
$list.AllowDeletion = $false
(Not $list.AllowDelete)
I will give it a go.
I just tried again using version 3.11.1907.0
It does not work.
The issue is that AllowDelete property is not available in the SharePoint.Client library
Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:
Apply-SPOProvisioningTemplate
orGet-SPOProvisioningTemplate
? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues. -- NoReporting an Issue or Missing Feature
Missing Feature
Expected behavior
Please describe what output you expect to see from PnP-PowerShell Cmdlets $list = Get-PnpList -Identity "ListName" $list.AllowDelete = $false $list.Update() should be possible
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots The property 'AllowDelete' cannot be found on this object. Verify that the property exists and can be set.
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists $list = Get-PnpList -Identity "ListName" $list.AllowDelete = $false $list.Update()
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name *pnppowershell* -ListAvailable
)How did you install the PnP-PowerShell Cmdlets?