Powershell script to list all the webpart in subsite
Hi all, My requirement is to find the list of all web parts present in the subsite page. Of course we use 'GetLimitedWebPartManager' to get the details of the webpart present in the site. But my scenrio is to find the webpart in the subsite page... for example consider the following URL : http://srivtam:2222/sites/bgas/SitePages/shareprice.aspx srivtam:2222 - sitecollectionURL sites/bgas -site shareprice-sitepage i want to get the list of all web parts in the site page....If I use the 'GetLimitedWebPartManager' method am getting a following error <dir> Exception calling "GetLimitedWebPartManager" with "2" argument: "The file _http://srivtam:2222/sites/bgas/SitePages/shareprice.aspx does not exist." At C:\DeploymentBinaries\PACKAGES\Centrica.Intranet2010.SharePrice\Function\CI2010_Web part_Property.ps1:18 char:48 + $spWpManager = $spweb.GetLimitedWebPartManager <<<< ($SitePageURL,[System.Web.UI .WebControls.WebParts.PersonalizationScope]:hared) <dir> + CategoryInfo : NotSpecified: ( [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException Please any one can tell me what should i do to over come the above error and get the list of all webparts. </dir></dir>Vaishali Sankar
August 30th, 2012 2:31am

Sorry, but I'm not awake enough this morning to parse and reconcile code. But, there are several others that appear to have tackled this, so check them out and see what's missing. http://blog.falchionconsulting.com/index.php/2007/10/enumerate-page-web-parts/ http://www.glynblogs.com/2011/07/listing-all-web-parts-in-a-site-collection-with-powershell.html When all else fails: http://www.bing.com/search?q=powershell+enumerate+web+partsSteve Clark, MCTS | Twin-Soft.com Easy Bins Dumpster Rentals of Northern VA. (Specializing in driveway-sized roll-off dumpsters.) Be sure to click one of them there forum buttons that artificially inflates my narcissitic ego... I mean gives me points.
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2012 9:56am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics