Quantcast
Channel: SharePoint 2013 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 26374

Powershell script to list all the webpart in subsite

$
0
0

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


Viewing all articles
Browse latest Browse all 26374

Trending Articles



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