How to add list items in a SharePoint List using PowerShell?

In this Blog, I will you give the Power Shell script to add  list items in a specific list using PowerShell Commands. This is quite helpful especially if you are dealing with huge and bulk lists.

System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)

$site = new-object Microsoft.SharePoint.SPSite(“http://mytest”)
$relweburl = ”/employeesite”
$web = $site.openweb($relweburl)

$list = $web.Lists[“EmployeeList”]

$newItem = $list.items.add()
$newitem[“EmployeeName”] =”Letsharepoint”
$newitem[“Employee Address”] = “WWW.letsharepoint.com”
$newitem[“Employee email address”] = “admin@letsharepoint.com”
$newitem.update()

You can read my Blog to remove list items from a sharepoint list using PowerShell as well.

Happy SharePointing Folks!! Hope it helps!!

Leave a Reply

Your email address will not be published.