Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. https://oursites.../Lists/My List/Team View.aspx
  2.  
  3. https://oursites..../SitePages listings.
  4.  
  5. function Remove-SPListView {
  6. Param(
  7. [string]$WebUrl,
  8. [string]$ListName,
  9. [string]$ViewName
  10. )
  11. Start-SPAssignment -Global
  12. $SPWeb = Get-SPWeb $WebUrl
  13. $List = $SPWeb.Lists[$ListName]
  14. $View = $List.Views[$ViewName]
  15. $List.Views.Delete($View.ID)
  16. $List.Update()
  17. $SPWeb.Update()
  18. $SPWeb.Dispose()
  19. Stop-SPAssignment -Global
  20. }
  21.  
  22. [$ViewName]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement