Our sales team sends a spreadsheet of new orders every week, and someone has to get those rows into a SharePoint list. Typing them into the browser form takes an afternoon and invites typos, so we script it.
In this tutorial, we’ll add SharePoint Online list items using PnP PowerShell. We’ll build a real orders list with every common column type, then add items one at a time, from a CSV file and in a batch, and finish with a quick update.
Before You Start
You need edit permission on the list, PowerShell 7.4 or later and PnP.PowerShell with your own Entra ID app registration; see installing PnP PowerShell for SharePoint Online. I used PnP.PowerShell 3.3.0 on the SPGuides site.
| Internal name | Type | Sample value |
|---|---|---|
| Title, CustomerName | Single line of text | SO-1002, Fabrikam Inc. |
| Quantity / OrderTotal | Number / Currency | 12 / 1499.88 |
| OrderDate | Date only | 01/28/2026 |
| OrderStatus | Choice | Processing |
| SalesRep | Person | miller@spguides.onmicrosoft.com |
| Product | Lookup (SPGDemo Products) | 3 (USB-C Dock) |
| Paid / Notes / TrackingLink | Yes/No / Multiple lines / Hyperlink | $true / two lines / UPS link |
Step 1: Connect to the SharePoint Site
Connect to the site that holds the list. On a machine without a browser, swap -Interactive for -DeviceLogin.
$siteUrl = "https://spguides.sharepoint.com/sites/SPGuides"
$clientId = "00000000-0000-0000-0000-000000000000" # your Entra ID app's client ID
Connect-PnPOnline -Url $siteUrl -ClientId $clientId -Interactive
Checkpoint: Get-PnPWeb returns the site title without an error.
Step 2: Create the Demo List and Columns
Have a list already? Skip ahead. This builds a products list for the lookup, then SPGDemo Orders. More options are in creating a SharePoint list and adding columns with PnP PowerShell.
# Lookup source list
New-PnPList -Title "SPGDemo Products" -Template GenericList
"Laptop Stand", "Wireless Mouse", "USB-C Dock", "Monitor Arm" | ForEach-Object {
Add-PnPListItem -List "SPGDemo Products" -Values @{ Title = $_ }
}
$productsId = (Get-PnPList -Identity "SPGDemo Products").Id
# Orders list
$list = "SPGDemo Orders"
New-PnPList -Title $list -Template GenericList
Add-PnPField -List $list -DisplayName "Customer Name" -InternalName CustomerName -Type Text -AddToDefaultView
Add-PnPField -List $list -DisplayName "Quantity" -InternalName Quantity -Type Number -AddToDefaultView
Add-PnPField -List $list -DisplayName "Order Total" -InternalName OrderTotal -Type Currency -AddToDefaultView
Add-PnPFieldFromXml -List $list -FieldXml '<Field Type="DateTime" Format="DateOnly" Name="OrderDate" StaticName="OrderDate" DisplayName="Order Date" />'
Add-PnPField -List $list -DisplayName "Order Status" -InternalName OrderStatus -Type Choice -Choices "New","Processing","Shipped","Delivered" -AddToDefaultView
Add-PnPField -List $list -DisplayName "Sales Rep" -InternalName SalesRep -Type User -AddToDefaultView
Add-PnPFieldFromXml -List $list -FieldXml "<Field Type='Lookup' Name='Product' StaticName='Product' DisplayName='Product' List='{$productsId}' ShowField='Title' />"
Add-PnPField -List $list -DisplayName "Paid" -InternalName Paid -Type Boolean -AddToDefaultView
Add-PnPField -List $list -DisplayName "Notes" -InternalName Notes -Type Note -AddToDefaultView
Add-PnPField -List $list -DisplayName "Tracking Link" -InternalName TrackingLink -Type URL -AddToDefaultView
The date and lookup columns use Add-PnPFieldFromXml, so the date stores no time and the lookup points at the products list by ID.

Checkpoint: Eleven columns, Title to TrackingLink. On someone else’s list, get the column internal names first: -Values accepts only internal names.
Step 3: Add a Single Item with Add-PnPListItem
Pass the list name and a hashtable of internal names and values:
Add-PnPListItem -List "SPGDemo Orders" -Values @{
Title = "SO-1001"
CustomerName = "Northwind Traders"
}