Skip to content

Instantly share code, notes, and snippets.

@rjesh-git
Created April 16, 2016 18:10
Show Gist options
  • Save rjesh-git/ce063aeac57181fe00235a66b88505f7 to your computer and use it in GitHub Desktop.
Save rjesh-git/ce063aeac57181fe00235a66b88505f7 to your computer and use it in GitHub Desktop.
try{
$itemCreateInfo = New-Object Microsoft.SharePoint.Client.ListItemCreationInformation
$listItem = $list.addItem($itemCreateInfo)
$daten = Get-Date
$listItem.set_item('Title',$daten)
$listItem.update()
$ctx.Load($listItem)
$ctx.ExecuteQuery()
Write-Output "Item successfully created."
}
catch {
Write-Output "Exception occured in list item creation."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment