I have to create one Powershell script. This will iterate though all the sites/subsites in one site collection and access master page used by the site. Once i get it, i have to update that master page with some HTML in one content place holder.

Got one script to access master page but don't know how to use it in Powershell because shell does't have this or say page request instance.

ContentPlaceHolder cp = (ContentPlaceHolder)this.Page.Master.FindControl("ContentPlaceHolder1");

Site collection has many sites of type team site/discussion broad or publishing.

Your Answer

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

Browse other questions tagged or ask your own question.