Remove-PnPCustomAction
SYNOPSIS
Removes a custom action.
SYNTAX
Remove-PnPCustomAction [[-Identity] <UserCustomActionPipeBind>] [-Scope <CustomActionScope>] [-Force]
[-Connection <PnPConnection>]
DESCRIPTION
Allows to remove a custom action.
EXAMPLES
EXAMPLE 1
Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2
Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2'.
EXAMPLE 2
Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2 -Scope web
Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2' from the current web.
EXAMPLE 3
Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2 -Force
Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2' without asking for confirmation.
EXAMPLE 4
Get-PnPCustomAction -Scope All | ? Location -eq ScriptLink | Remove-PnPCustomAction
Removes all custom actions that are ScriptLinks.
PARAMETERS
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Use the -Force flag to bypass the confirmation question.
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The id or name of the CustomAction that needs to be removed or a CustomAction instance itself.
Type: UserCustomActionPipeBind
Parameter Sets: (All)
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Scope
Define if the CustomAction is to be found at the web or site collection scope. Specify All to allow deletion from either web or site collection.
Type: CustomActionScope
Parameter Sets: (All)
Accepted values: Web, Site, All
Required: False
Position: Named
Default value: Web
Accept pipeline input: False
Accept wildcard characters: False