pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
987 stars 665 forks source link

AllowDelete property not available on list #2000

Open jaskirat-randhawa opened 5 years ago

jaskirat-randhawa commented 5 years ago

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:

  1. Are you using Apply-SPOProvisioningTemplate or Get-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. -- No
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/OfficeDev/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/officedev/PnP-Sites-Core/issues No

Reporting 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?

kachihro commented 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)

jaskirat-randhawa commented 5 years ago

I will give it a go.

jaskirat-randhawa commented 5 years ago

I just tried again using version 3.11.1907.0

It does not work.

jaskirat-randhawa commented 5 years ago

The issue is that AllowDelete property is not available in the SharePoint.Client library