I have different lists in different Websites that I would like to show in one webpart. I tried it using the ContentByQueryWebPart. By using the GUI, I only can choose one list which isn't enough. In addition to that, I need to solve this problem programmitically with Powershell. What I have so far:
$webpartmanager = $web.GetLimitedWebPartManager($rootSite, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared); $webpart = New-Object Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart; $webpart.Title = "Information"; $webpartmanager.AddWebPart($webpart, $webpartzone, 2);
It works so far, a Webpart with the Title "Information" is succesfully created. I just need the method / property with which I can put in mukltiple lists.
Can anybody help?