Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Query "Site Pages", "Pages" by title using PowerShell and CSOM generically

$
0
0

Hi All,

I am not really a sharepoint export, but I do have the following thing I need to achiev.

I do have around 60 different sites collections where I do need to generate a report of the "Pages" and "Site Pages" libraries.

I am using the following code to retrieve the List:

$Lib = $clientContext.Web.Lists.GetByTitle($List)
$ClientContext.Load($Lib)
$clientContext.ExecuteQuery() 

This actually work fine when I stay on the english speaking sites, since they use 'Pages' and 'SitePages'.

But for spanish for example, I need to use 'Páginas'  and'Páginas del sitio'.

I do need to get the same information from sites in Portugueses, Dutch, German, Chinese etc... which means I need to adapt my query to the 'exact name' of the library 'Pages' and 'sitePages' from the that specefic language.

For now I have listed the cases I know about of. But I am sure there must be a better way to handle this type of situation!

Does anybody knows of a more 'generic way' to get to the Pages and Site Pages name according to the language the site collection is installed in? (For example, can I take always the same ID? or so?)

Thanks a lot in advance for your feedback.


#Stephane


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>