2

I'm using Get-PnpList and Get-PnpListItem to retrieve all items in a specific list, but I would like to restrict the items to only those in a specific view?

Is this possible? Maybe with a CAML query, etc..

5

Unfortunately, There is no direct parameter like -View to specify your View Name in Get-PnPListItem

Meanwhile, as a workaround solution, you can pass the CAML Query to the -Query parameter based on your View setting.

Ex:

Get-PnPListItem -List Tasks -Query "<View><Query><Where><Eq><FieldRef Name='GUID'/><Value Type='Title'>Qassas</Value></Eq></Where></Query></View>

Note: you can build your CAML Query by using U2U tool

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.