Get-PnPCustomAction

Return user custom actions

Syntax

Get-PnPCustomAction
   [-Includes <String[]>]
                      [-Identity <GuidPipeBind>]
                      [-Scope <CustomActionScope>]
                      [-ThrowExceptionIfCustomActionNotFound [<SwitchParameter>]]
                      [-Web <WebPipeBind>]
                      [-Connection <SPOnlineConnection>]

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.

------------------EXAMPLE 4------------------

Get-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2 -Includes 'Id','Title','ClientSideComponentProperties'

Returns the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2' as well as specific properties, such as ClientSiteComponentProperties

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:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Identity

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

Type:GuidPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Includes

Specify properties to include when retrieving objects from the server.

Type:String[]
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-Scope

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

Type:CustomActionScope
Position:Named
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
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Web

The web to apply the command to. Omit this parameter to use the current web.

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Outputs

List<Microsoft.SharePoint.Client.UserCustomAction>