0

I have a task to update all master and default.aspx pages of all our sites (about 30 sites). The task is to add a block of code including site name and links to scripts and styles. I am not sure whether I can do it using Power-Shell as the data differs from each other (site names).

Could anybody suggest some way to complete the task without opening each site in the SharePoint Designer and modifying each file there?

Thanks in advance.

0

if you're using a single master page and publishing feature (I'm assuming here), just go into site collection settings, master page (Look and Feel) and select the checkbox for "Reset all subsites to inherit this site master page setting".

Edit: To modify your master page and add the site title within your aspx, please go to this other thread

  • Thanks for the response. The question is that I need to add same scripts and styles to the default.aspx files of all sites. They might be inherited somehow because all the lines are same. In case of master pages, the data is different. e.g. <div>Site One</div> <div>Site Two</div>. From the other hand I am using SP Foundation 2013 which as far as I know does not have the 'Master Page' option under Look and Feel section. – Emil Gurbanov Jul 12 '16 at 14:16
  • If you want to go with one style for all the pages, you should use publishing features and find the correct tags to add to your master page, this way you only do one change and it replicates through all your collection. Please take a look in here – Yugo Jul 12 '16 at 14:23
  • Unfortunately the publishing feature is not available on the SharePoint Foundation – Emil Gurbanov Jul 13 '16 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.