SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
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 | 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
share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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