external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Removes a custom action
Remove-PnPCustomAction [-Scope <CustomActionScope>]
[-Force [<SwitchParameter>]]
[-Identity <UserCustomActionPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
PS:> Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2
Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2'.
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.
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.
PS:> Get-PnPCustomAction -Scope All | ? Location -eq ScriptLink | Remove-PnPCustomAction
Removes all custom actions that are ScriptLinks
Use the -Force flag to bypass the confirmation question
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
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
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
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
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