Created
April 16, 2016 03:14
-
-
Save rjesh-git/d3c5157b14862bfa4bbda65173a3285e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$pubPageInfo = New-Object Microsoft.SharePoint.Client.Publishing.PublishingPageInformation | |
$pubPageInfo.Name = $CSVitem.Name.Replace(" ", "-") + ".aspx" | |
$pubPageInfo.PageLayoutListItem = $tpLayoutItem | |
$pubPage = $pubWeb.AddPublishingpage($pubPageInfo) | |
$ctx.Load($pubPage) | |
$ctx.ExecuteQuery() | |
$listItem = $pubPage.get_listItem() | |
$ctx.Load($listItem) | |
$ctx.ExecuteQuery() | |
$listItem.Set_Item("Title", $CSVitem.Title) | |
$listItem.Set_Item("PublishingPageContent", $CSVitem.Description) | |
$listItem.Set_Item("SeoMetaDescription", $CSVitem.ContentSummary) | |
$listItem.Set_Item("SOME-MANAGED-METADATA-COLUMN",'GUID GOES HERE OR READ FROM CSV') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment