Monday, October 22, 2012

Removing a web part from a page recursively with Powershell

This week we were making some changes to the content on our orders pages, we decided to remove a web part that was showing some static content and replace it with an SSRS report that I blogged about earlier. I needed this to quickly remove a web part off of each of my 500+ orders sites, so Powershell was looking like the tool of choice for this operation, and let me just take a moment to say I am stoked that at last I am spending more time in Powershell to do even simple things that are now too slow going through the SharePoint UI, removing or adding web parts via Powershell is an awesome way to do it. I was able to pick at a few samples I found online and create something that worked for me.

 

No comments: