Skip to content

Instantly share code, notes, and snippets.

@cmd64
Last active January 29, 2019 12:18
Show Gist options
  • Save cmd64/67b4d702bf458785e4093289ec65fc3c to your computer and use it in GitHub Desktop.
Save cmd64/67b4d702bf458785e4093289ec65fc3c to your computer and use it in GitHub Desktop.
SharePoint PowerShell - Add item to list
#If run on Windows PowerShell must be add below code
#Add-PSSnapin Microsoft.SharePoint.PowerShell
$web = Get-SPWeb "http://siteaddress"
$spList = $web.Lists["List Title"]
$newItem = $spList.AddItem()
$newitem["Title"] = "Test"
$newitem["OtherColumn"] = "Test2"
$newitem.update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment