external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Executes operations on web, lists and list items.
Invoke-PnPWebAction [-Webs <Web[]>]
[-WebAction <Action`1>]
[-ShouldProcessWebAction <Func`2>]
[-PostWebAction <Action`1>]
[-ShouldProcessPostWebAction <Func`2>]
[-WebProperties <String[]>]
[-ListAction <Action`1>]
[-ShouldProcessListAction <Func`2>]
[-PostListAction <Action`1>]
[-ShouldProcessPostListAction <Func`2>]
[-ListProperties <String[]>]
[-ListItemAction <Action`1>]
[-ShouldProcessListItemAction <Func`2>]
[-ListItemProperties <String[]>]
[-SubWebs [<SwitchParameter>]]
[-DisableStatisticsOutput [<SwitchParameter>]]
[-SkipCounting [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
PS:> Invoke-PnPWebAction -ListAction ${function:ListAction}
This will call the function ListAction on all the lists located on the current web.
PS:> Invoke-PnPWebAction -ShouldProcessListAction ${function:ShouldProcessList} -ListAction ${function:ListAction}
This will call the function ShouldProcessList, if it returns true the function ListAction will then be called. This will occur on all lists located on the current web
Will not output statistics after the operation
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the list. There is one input parameter of type List
Type: Action`1
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the list item. There is one input parameter of type ListItem
Type: Action`1
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The properties to load for list items.
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The properties to load for list.
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the list, this will trigger after list items have been processed. There is one input parameter of type List
Type: Action`1
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the web, this will trigger after lists and list items have been processed. There is one input parameter of type Web
Type: Action`1
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the web that would determine if ListAction should be invoked, There is one input parameter of type List and the function should return a boolean value
Type: Func`2
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the web that would determine if ListItemAction should be invoked, There is one input parameter of type ListItem and the function should return a boolean value
Type: Func`2
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the web that would determine if PostListAction should be invoked, There is one input parameter of type List and the function should return a boolean value
Type: Func`2
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the web that would determine if PostWebAction should be invoked, There is one input parameter of type Web and the function should return a boolean value
Type: Func`2
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the web that would determine if WebAction should be invoked, There is one input parameter of type Web and the function should return a boolean value
Type: Func`2
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Will skip the counting process; by doing this you will not get an estimated time remaining
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Specify if sub webs will be processed
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Function to be executed on the web. There is one input parameter of type Web
Type: Action`1
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The properties to load for web.
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
Webs you want to process (for example different site collections), will use Web parameter if not specified
Type: Web[]
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