Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. foreach($site in $webApplication.Sites)
  2. {
  3. foreach($web in $site.AllWebs)
  4. {
  5. foreach($list in $web.Lists)
  6. {
  7. $pages= $list.GetItems($query);
  8.  
  9. if ($pages)
  10. {
  11. foreach($item in $pages)
  12. {
  13.  
  14.  
  15.  
  16. $manager = $item.File.GetLimitedWebPartManager([System.Web.UI.WebControls.Webparts.PersonalizationScope]::Shared);
  17. $webCollection = $manager.WebParts;
  18. if($webCollection.Count -ne 0)
  19. {
  20. for($i =0;$i -lt $webCollection.Count; $i++)
  21. {
  22. $wp = $webCollection[$i];
  23. write-host $wp.Title;
  24. write-host $wp.GetType().AssemblyQualifiedName
  25. ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement