Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodecleyre committed Dec 12, 2023
1 parent 5f8185f commit eabdb86
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/docs/cmd/spo/listitem/listitem-batch-add.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,18 @@ m365 spo listitem batch add --filePath "C:\Path\To\Csv\CsvFile.csv" --webUrl htt
Add a batch of items to a list retrieved by title in a specific site using csv content

```sh
$obj = [PSCustomObject]@{
Title = "Item A"
NumberField = 10
}

$csv = ConvertTo-Csv -InputObject $obj -Delimiter "," -NoTypeInformation
$obj = $obj = @(
[PSCustomObject]@{
Title = "Item A"
Age = 10
},
[PSCustomObject]@{
Title = "Item B"
Age = 20
}
)

$csv = $obj | ConvertTo-Csv -NoTypeInformation -Delimiter ","

$csvContent = $($csv | Out-String).Replace('"','\"')

Expand Down

0 comments on commit eabdb86

Please sign in to comment.