Stop-KFPermissionInheritance

Syntax

Stop-KFPermissionInheritence 
  [-Item <list-item>] 
  [-CopyCurrentPermissions[:$false]]
  [-ThrowErrors[:$true]]

Support

>= kenaflow 1.0.0

Return

Nothing.

Description

With this cmdlet, you stop the inheritance of permissions on a list item.

The list item can be specified with parameter -Item if the cmdlet should not process the current item of the workflow or - in case of a site workflow - there is no "current item".

If it is not specified, the list item for which the workflow is currently being executed is used.

If the permission inheritance is already stopped, nothing is done and nothing is changed.

The cmdlet is only available for SharePoint workflows.

Parameters

[-Item <list-item>]

The list item to be processed.

[-CopyCurrentPermissions[:$false]]

If inheritance is stopped it is possible to copy the permission settings of the parent of the list item - this is a folder or a list. If not specified the permissions of the list item are blank after the cmdlet was executed.

[-ThrowErrors[:$true]]

This is a default parameter for all kenaflow cmdlets. If set to $true (default!) the engine will pass exception within the cmdlet to the script for further handling.

Example

$myItem = Get-PnPListItem -List "Custom List" -Id 1
Stop-KFPermissionInheritance -Item $myItem
Reset-KFPermissionInheritance -Item $myItem