I am trying to use the following cmdlet in the pnp module on O365 and one of the parameters for the cmdlet is -identity
-Identity The ID of the listitem, or actual ListItem object
Type: ListItemPipeBind
Position: Named
Accept pipeline input: True
Accept wildcard characters: False
The parameter says the ID of the listitem or the listitem object, I am trying to put the name instead of the ID
So changing -identity
from
Set-PnPListItemPermission -List 'Test' -Identity 1 -User '[email protected]' -AddRole 'Contribute' -ClearExisting
To
Set-PnPListItemPermission -List 'Test' -Identity "TestFolder" -User '[email protected]' -AddRole 'Contribute' -ClearExisting
The script runs on both occasions with no errors but the permission is only changed when -identity is the ID, am I missing something here?