Skip to content

Latest commit

 

History

History
115 lines (85 loc) · 2.98 KB

Remove-PnPCustomAction.md

File metadata and controls

115 lines (85 loc) · 2.98 KB
external help file applicable schema
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online
2.0.0

Remove-PnPCustomAction

SYNOPSIS

Removes a custom action

SYNTAX

Remove-PnPCustomAction [-Scope <CustomActionScope>]
                       [-Force [<SwitchParameter>]]
                       [-Identity <UserCustomActionPipeBind>]
                       [-Web <WebPipeBind>]
                       [-Connection <SPOnlineConnection>]

EXAMPLES

------------------EXAMPLE 1------------------

PS:> Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2

Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2'.

------------------EXAMPLE 2------------------

PS:> 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------------------

PS:> 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------------------

PS:> Get-PnPCustomAction -Scope All | ? Location -eq ScriptLink | Remove-PnPCustomAction

Removes all custom actions that are ScriptLinks

PARAMETERS

-Force

Use the -Force flag to bypass the confirmation question

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: 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
Accept pipeline input: True

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

Required: False
Position: Named
Accept pipeline input: False

-Connection

Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

RELATED LINKS

SharePoint Developer Patterns and Practices