Skip to content

Instantly share code, notes, and snippets.

@cmd64
Last active August 19, 2021 13:27
Show Gist options
  • Save cmd64/c150deaaeda61e2d3ebcfb72d9f52043 to your computer and use it in GitHub Desktop.
Save cmd64/c150deaaeda61e2d3ebcfb72d9f52043 to your computer and use it in GitHub Desktop.
[Powershell] Get all site collections on farm.
Get-SPSite -Limit All | Get-SPWeb -Limit All | Select-Object -Property Title, Url | Format-Table *
#Only Root Webs
Get-SPSite -Limit All | Get-SPWeb -Limit All | Where { $_.IsRootWeb } | Select-Object -Property Title, Url | Format-Table *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment