Table of Contents

Get-PnPCustomAction

SYNOPSIS

Return user custom actions

SYNTAX

Get-PnPCustomAction [-Identity <Guid>] [-Scope <CustomActionScope>]
 [-ThrowExceptionIfCustomActionNotFound] [-Connection <PnPConnection>]
 [-Includes <String[]>] 

DESCRIPTION

Returns all or a specific user custom action

EXAMPLES

EXAMPLE 1

Get-PnPCustomAction

Returns all custom actions of the current site.

EXAMPLE 2

Get-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2

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

EXAMPLE 3

Get-PnPCustomAction -Scope web

Returns all custom actions for the current web object.

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

-Identity

Identity of the CustomAction to return. Omit to return all CustomActions.

Type: Guid
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope

Scope of the CustomAction, either Web, Site or All to return both

Type: CustomActionScope
Parameter Sets: (All)
Accepted values: Web, Site, All

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThrowExceptionIfCustomActionNotFound

Switch parameter if an exception should be thrown if the requested CustomAction does not exist (true) or if omitted, nothing will be returned in case the CustomAction does not exist

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Includes

Optionally allows properties to be retrieved for the returned custom action which are not included in the response by default

Type: String[]
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices