pnpListCAML

Title: Get the List Items using PnP and CAML query


  • $URL="https://hpeblore.sharepoint.com/sites/Omi"    
  •   
  • # Connect to SharePoint Online     
  • Connect-PnPOnline -Url $URL -Credentials Get-Credential    
  •     
  •    $listItems= Get-PnPListItem -List Employee -Query "<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>Sudeep</Value></Eq></Where></Query></View>"    
  • foreach($listItem in $listItems){    
  •    Write-Host "Name" : $listItem["Title"]    
  •    Write-Host "Location" : $listItem["Location"]    
  •    Write-Host "Address" : $listItem["Address"]    
  •       
  • }    



  • OutPut: