In this tutorial, I will show you how to create, read, update, and delete an item from a SharePoint Online list using PnP PowerShell.
This is a complete CRUD (Create, Read, Update, Delete) operation in SharePoint list items using PnP PowerShell.
For all the examples, I will use the below SharePoint list named “ProjectTasks” with the following columns:
- Title (Single line of text)
- Description (Multiple lines of text)
- DueDate (Date and Time)
- AssignedTo (Person or Group)
You can create this SharePoint list on your SharePoint Online site before using the examples below. You can also create the SharePoint list using PnP PowerShell.
I have created the above list, and with sample data, you can see the SharePoint Online list looks like below:

Create an Item in a SharePoint List using PnP PowerShell
Let me first show you how to create an item in a SharePoint Online list using PnP PowerShell.
To insert an item to a SharePoint Online list, you can use the Add-PnPListItem cmdlet. Below is the syntax.
Add-PnPListItem [-List] <ListPipeBind> [-ContentType <ContentTypePipeBind>] [-Values <Hashtable>]
[-Folder <String>] [-Label <String>] [-Connection <PnPConnection>] Here is the complete PowerShell script to add an item to a SharePoint Online list. I have used the above SharePoint list.
# Connect to SharePoint Online
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/MarketingTeam" -Interactive
# Add a new item to the ProjectTasks list
Add-PnPListItem -List "ProjectTasks" -Values @{
Title = "Design Phase";
Description = "Complete the design phase of the project";
DueDate = "2025-08-01";
AssignedTo = "henriettam@szg52.onmicrosoft.com"
}Once you execute the above script and open the SharePoint Online list, you will see that the above item has been added to the list. Look at the screenshot below:

Read Delete All Items from a SharePoint List using PnP PowerShell
Get All SharePoint List items using PnP PowerShell
Now, let me show you how to read all SharePoint list items using PnP PowerShell.
To get SharePoint list items using PnP PowerShell, you can use the Get-PnPListItem cmdlet.
Here is the complete PowerShell script to read items from the “ProjectTasks” list using the Get-PnPListItem cmdlet.
# Connect to SharePoint Online
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/MarketingTeam" -Interactive
# Retrieve all items from the ProjectTasks list
$items = Get-PnPListItem -List "ProjectTasks"
foreach ($item in $items) {
Write-Host "Title: $($item['Title']), Description: $($item['Description']), DueDate: $($item['DueDate']), AssignedTo: $($item['AssignedTo'])"
}Once you execute the above PowerShell script, you can see the output in the screenshot below; it gets all the items from the SharePoint list.

Update a SharePoint List item using PnP PowerShell
Now, let me show you how to update a SharePoint list item using PnP PowerShell.
To update an item in the “ProjectTasks” list, you need the ID of the item you want to update. You can then use the Set-PnPListItem cmdlet.
Here is an example where I provide item ID 2 to update the SharePoint list item.
# Connect to SharePoint Online
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/MarketingTeam" -Interactive
# Update an item in the ProjectTasks list
Set-PnPListItem -List "ProjectTasks" -Identity 2 -Values @{
Title = "Design Phase Updated";
Description = "Update the design phase of the project";
DueDate = "2025-08-15";
AssignedTo = "johannal@szg52.onmicrosoft.com"
}After I executed the above PowerShell script using VS code, the item got updated, as shown in the screenshot below.

This is how to update a SharePoint list item using PnP PowerShell.
Read Add More Than 5000 Items to a SharePoint Online List using PnP PowerShell?
Delete SharePoint List Item using PnP PowerShell
Now. let me show you how to delete a SharePoint list item using PnP PowerShell.
In PnP PowerShell, you can use the Remove-PnPListItem cmdlet to delete an item from the SharePoint list/
Here is the complete PowerShell script to delete an item from the “ProjectTasks” list using the Remove-PnPListItem cmdlet.
In the below example, you can see I passed the item ID as 2 and the script will delete the item whose ID is equal to 2.
# Connect to SharePoint Online
Connect-PnPOnline -Url "https://szg52.sharepoint.com/sites/MarketingTeam" -Interactive
# Delete an item from the ProjectTasks list
Remove-PnPListItem -List "ProjectTasks" -Identity 2 -ForceOnce you execute the above PowerShell script, the item whose ID=2 will be deleted from the SharePoint Online list.
This is how to delete an item from a SharePoint list using PnP PowerShell.
Conclusion
In this tutorial, I have explained a CRUD operation on SharePoint list items using PnP PowerShell. With various examples, I have explained the following things:
- Create list item in SharePoint using PnP PowerShell
- Get SharePoint list items using PnP PowerShell
- Update a list item using PnP PowerShell in SharePoint Online
- How to delete a list item using PnP PowerShell
You may also like the following tutorials:
- Delete and Recover a SharePoint Online Site Using PowerShell and PnP PowerShell
- Disable Versioning in a SharePoint Library Using PnP PowerShell
- Get Count of Items in SharePoint List using PnP PowerShell
Bijay Kumar is an esteemed author and the mind behind PowerShellFAQs.com, where he shares his extensive knowledge and expertise in PowerShell, with a particular focus on SharePoint projects. Recognized for his contributions to the tech community, Bijay has been honored with the prestigious Microsoft MVP award. With over 15 years of experience in the software industry, he has a rich professional background, having worked with industry giants such as HP and TCS. His insights and guidance have made him a respected figure in the world of software development and administration. Read more.