Delete SharePoint Online list using PowerShell
Another simple article, which provides a PowerShell script that I need to use to download a file from a Sharepoint site. So for that we are using thePnp.Powershellmodule by giving the Sharepoint online credentials and then we useConnect-PnPOnlinefunction to connect in the account from the PowerShell. The documentation of this module can be found here:PnP PowerShell Overview | Microsoft Docs In order to work, we need to set the list name from Sharepoint in the variable called$ListName. After that we use a do function while the count of items from that list is greater than zero. While that logic is negative, it will delete the rows:$items[0].DeleteObject(). Script exampleAgain its a really simple Powershell solution, and the script of this article can be found on my GitHub reporitory:guimatheus92/DeleteRowsFromSharepointList (github.com) I hope you enjoyed this simple solution! This blog is part ofSharePoint Week. For more great content, clickhere Check out Guilhermes website here About the Author: Brazilian, engineer and developer well versed in BI, SQL, Data Modelling, Analysis Services, ETL Process, Python, VBA, Power BI, etc. Passionate about technology, who uses agile pratices and decision-making processes data-driven. You can find me in my LinkedIn profile, from my website and also from my Medium profile. Matheus. G. (2021). Delete rows from a Sharepoint list through Powershell script. Available at: https://guimatheus92.medium.com/delete-rows-from-a-sharepoint-list-through-powershell-script-aee081cb9d24 [Accessed: 14th September 2021]. Share this on... |