TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
PowerShell scripts to check if the site collection is Host Based or Path Based
Lakshmanan Sethu Sankaranarayan
Oct 14
2014
Code
2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Below are the Powershell commands to check if the site collection is either Host Based or Path. These commands would be very useful while migrating SharePoint 2010 to 2013.
webApp = Get-SPWebapplication
'http://portal.mysite.com'
foreach($spSite
in
$webApp.Sites)
{
if
($spSite.HostHeaderIsSiteName)
{ Write-Host $spSite.Url
'is host-named'
}
else
{ Write-Host $spSite.Url
'is path based'
}
}
Host Based Site Collection
Path Based Site Collection