Created
June 13, 2014 10:44
-
-
Save kasuken/33b1f2ef0170ea93da8a to your computer and use it in GitHub Desktop.
SharePoint 2013: Add item to links list with PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$site =new-object Microsoft.SharePoint.SPSite("http://intranet") | |
$web = $site.OpenWeb() | |
$list = $web.Lists["Useful Links"] | |
$item = $list.Items.Add() | |
$urlValue = New-Object Microsoft.SharePoint.SPFieldUrlValue() | |
$urlValue.Description = "Link Description"; | |
$urlValue.Url = "http://www.bing.com" | |
$item["URL"] = $urlValue | |
$item.update() | |
$list.update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment