Steps
  1. Open your SharePoint Management Shell.
  2. Copy the code given below and paste it there.
  3. Run the code given below to delete the SharePoint search component.
Code
  1. $siteUrl = Read-Host "https://gowtham.sharepoint.com/tutorials"
  2. $rootSite = New-Object Microsoft.SharePoint.SPSite($siteUrl)
  3. $spWebApp = $rootSite.WebApplication
  4. foreach($site in $spWebApp.Sites)
  5. {
  6. foreach($siteAdmin in $site.RootWeb.SiteAdministrators)
  7. {
  8. Write-Host "$($siteAdmin.ParentWeb.Url) - $($siteAdmin.DisplayName)"
  9. }
  10. $site.Dispose()
  11. }
Thanks for reading my blog.

Comments

Join the conversation! Your thoughts help the community grow.