I was working in SharePoint powerShell and ran the command [Get-SPSite -Limit All] and I get the list of sites as expected, however, One Site shows up twice (see example below);


Should I be seeing teamsite twice?

If Not, how do I correct this?


Command that you provided returns list of all sites from ALL WebApplications. Please, make sure that there is no another site with url "/teamsite" on any another WebApplication.

  • I have the same problem, where Get-SPSite returns three instances of the same SPSite site collection, ID's and URL's exactly the same. – Jasper May 29 '13 at 8:45
  • Could you provide full command's string? – Andrew May 29 '13 at 12:30
  • Get-SPWebApplication contoso.com | Get-SPSite | ft Url,Id – Jasper May 29 '13 at 17:40

To remedy the duplicated site collection issue, you can try dismounting the content database and re-mounting it.

you can get the name of the content database with:

$s = get-spsite http://teamsite
$name = $s.ContentDatabase.Name

Dismount-SPContentDatabase $s.ContentDatabase

Mount-SPContentDatabase -webapplication http://teamsite -name $name

Just ran into this today and found another way to do this is to modify the command to be:

Get-SPWebApplication http://intranet | Get-SPSite -Limit ALL | select -Unique

The -Limit ALL isn't required, but you will want to use that if you have more than 20 Site Collections, the | select -Unique is what will acutally remove the duplicate URL in the list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.