Oct 21 2021 06:22 AM
Hi, I am using the following to delete a large SharePoint Online list (200k items) and was wondering if there was a way I could add something to show the progress through the list? Something like "completed x of x" Any thoughts? Thanks.
Get-PnPListItem -List $listName -PageSize 500 -ScriptBlock {Param($items)} | ForEach-Object {Remove-PnPListItem -List $listName -Identity $_.Id -Force}
Oct 22 2021 03:30 PM
for($I = 1; $I -lt 101; $I++ )
{
Write-Progress -Activity Updating -Status 'Progress->' -PercentComplete $I -CurrentOperation OuterLoop
for($j = 1; $j -lt 101; $j++ )
{
Write-Progress -Id 1 -Activity Updating -Status 'Progress' -PercentComplete $j -CurrentOperation InnerLoop
}
}
Updating
Progress ->
[ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo]
OuterLoop
Updating
Progress
[oooooooooooooooooo ]
InnerLoop
Write-Progress (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Docs
Apr 17 2023 12:12 PM