Articles about European Sharepoint Hosting Service
SharePoint 2013 Hosting – HostForLIFE.eu :: How to Publish All Page Properties from a Site?
In this article, I will show you how to Publish All Page Properties from a Site with PowerShell in SharePoint 2013. This following code snippet for PowerShell to get all publishing page properties from a site.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
if ($ver.Version.Major - gt 1) { $Host.Runspace.ThreadOptions = "ReuseThread" } Add - PsSnapin Microsoft.SharePoint.PowerShell - ErrorAction SilentlyContinue Set - location $home $str = "http://localhost" function ProcessSubWebs($str) { $currentWeb = Get - SPWeb $str if ([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($currentWeb)) { $publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($currentWeb) $publishingPages = $publishingWeb.GetPublishingPages() foreach($publishingPage in $publishingPages) { if ($publishingPage.ListItem['Title'] - ne $null) { select Uri, Title, @ { Name = ’PageLayout’; Expression = { $_.Layout.ServerRelativeUrl } } $publishingPage | select Uri, Title, @ { Name = ’PageLayout’; Expression = { $_.Layout.ServerRelativeUrl } } $SPvaluesforOutput = $publishingPage | Select Uri, Title, Name $SPvaluesforOutput | Out - File c: \123. csv - append $publishingPage | Out - File c: \test.csv - append } } foreach($sub in $currentWeb.Webs) { if ($sub.Webs.Count - gt 0) { ProcessSubWebs($sub.Url) } } Write - Host - ForegroundColor red "FINISHED" } else { Write - Host - Foregroundcolor Red "$str not a publishing site" } } ProcessSubWebs($str) |
SharePoint 2013 Hosting Recommendation
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/month, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint plans as well as dedicated SharePoint options
Print article | This entry was posted by Peter on June 28, 2016 at 6:45 am, and is filed under European SharePoint 2013 Hosting. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |