How to Add SharePoint List Items using PowerShell

From Secrets of SharePoint – Tip of the Day

SharePoint 2010 offers over 500 new cmdlets that we can use to automate the SharePoint 2010 environment through Windows PowerShell. The cmdlets go as deep as SPWeb, everything beyond SPWeb requires additional scripting, such as adding fields, views and items. Here’s an example showing how to add an item to the Announcements list in SharePoint 2010:

In the example we use the Get-SPWeb cmdlet to bind to a specific site. Next we use the GetList() method to retrieve a list. The method accepts a lists relative URL as input. We then use the AddItem() method to create a new item in SharePoint 2010. Finally we use the Dispose() method on the SPWeb object to make sure that the object is disposed of correctly

Posted in SharePoint Tagged permalink

About Rick Backus

A technology consultant with over 25 years of IT, consulting and business technology industry experience. Specializing in integrating application, information and content management with business process and network infrastructure. Helping clients get the most out of technology to enable increased productivity, profitability, customer satisfaction and competitive advantage.

Leave a Reply