PnP Poweshell: Get-PnPListItem Restrict to a Specific View

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












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..







share|improve this question




























    up vote
    2
    down vote

    favorite












    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..







    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      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..







      share|improve this question














      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..









      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 22 at 2:57









      Mohamed El-Qassas MVP♦

      35.3k53879




      35.3k53879










      asked Aug 22 at 2:32









      Kevin M

      111




      111




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote













          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







          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "232"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f247543%2fpnp-poweshell-get-pnplistitem-restrict-to-a-specific-view%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote













            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







            share|improve this answer


























              up vote
              5
              down vote













              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







              share|improve this answer
























                up vote
                5
                down vote










                up vote
                5
                down vote









                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







                share|improve this answer














                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








                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Aug 22 at 2:47









                James Randal

                771216




                771216










                answered Aug 22 at 2:41









                Mohamed El-Qassas MVP♦

                35.3k53879




                35.3k53879



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f247543%2fpnp-poweshell-get-pnplistitem-restrict-to-a-specific-view%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    One-line joke